Have a Class and a Subclass handled the same way?
<p>I have a class called <code>Image</code> and a class that extends it called <code>ImageSheet</code>.</p>

<p><code>ImageSheet</code> is the same as <code>Image</code> except it has additional fields such as the number of frames on the sheet of images.</p>

<p>What I want to do is have it so I can call <code>drawImage(img, frame)</code> and have <code>img</code> be either a <code>Image</code> or an <code>ImageSheet</code> and handle them with the same method with the only difference being that if it's an <code>Image</code> then the <code>frame</code> field is ignored but when it's an <code>ImageSheet</code> the <code>frame</code> field is read and used to draw the specific frame.</p>

<p>I'm trying to avoid having separate methods for if it's an <code>Image</code> or an <code>ImageSheet</code> because I already have 3 different <code>drawImage()</code> methods that accept different input variables and if I did one for each class I'd have 3 pairs of methods where each pair is essentially exactly the same.</p>

<p>How can I pull off what I have in mind?</p>
