Is their a way to have the base class use the verbibols created in the parent class?
<p>I have a base class to handle images to be dragged on the screen.  It veribols for the name, and x,y position of each image.  Then it has methods to scale them and do other operations.</p>

<p>I would like to have 2 of these classes, but the imegs name and x,y postion would be diffrent.</p>

<p>I first tried to create a class that uses this class as a base class. I  this parent class I tried to creat the same verbols, hopping it would use these, instad of the ones created in the base class.</p>

<p>The base class still used the verbols created within it, instead of in the parent.</p>

<p>Is thier a way to do this, or am I barking up the wrong tree?</p>

<pre><code>public class cShapeParent extends cShapes {

    // would like the base class to use this data
    String[] mNames=
        {
        "ball_green.png",
        "ball_green.png",
        "ball_green.png"    
        };


    cShapeParent(Context context,int screenWidth, int screenHeight)
    {
        super(context, screenWidth, screenHeight);
    }
}
</code></pre>

<p>base class</p>

<pre><code>import java.io.IOException;
import java.io.InputStream;

import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Rect;

public class cShapes {
    public 

    String[] mNames=
        {
        "ball_green.png",
        "ball_red.png",
        "ball_blue.png" 
        };

    int[] mX={200,300,400};
    int[] mY={200,200,200};
    int[] mW={0,0,0};
    int[] mH={0,0,0};


    int Amount=3;
    int MyScreenWidth=512;

    int[] BitMapId={ 
    R.drawable.ball_green,  R.drawable.ball_red,  R.drawable.ball_blue,  R.drawable.ball_green
    };

     Bitmap MyImages[];
     Rect[] mBitmapSize;

    cShapes(Context context,int screenWidth, int screenHeight)
    {

        // Load in bitmaps
        MyImages=new Bitmap[4];

        AssetManager assetManager= context.getAssets();
        InputStream inputStream;
        mBitmapSize = new Rect[Amount];
        try {
            // set scaling ratio
            float r=(float)MyScreenWidth / (float)screenWidth;
            for(int i=0;i&lt;Amount;i++)
            {   

                   inputStream=assetManager.open( mNames[i]);
                   MyImages[i]=BitmapFactory.decodeStream(inputStream);

                   int w=(int)( (float)MyImages[i].getWidth()*r);
                   int h=(int)( (float)MyImages[i].getWidth()*r);
                   mBitmapSize[i]=new Rect(0,0,w,h);
                   mW[i]=w; mH[i]=h;

                   mX[i]=(int) ( (float)mX[i]*r);
                   mY[i]=(int) ( (float)mY[i]*r);

                   inputStream.close();
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }  
    }


    boolean Intersect(int id, int x,int y)
    {
    if ( x &gt;= mX[id] &amp;&amp; x &lt;= mX[id]+128 &amp;&amp; y &gt;= mY[id] &amp;&amp; y &lt;= mY[id]+128 ) 
        return true;

        return false;
    }
}  // end class
</code></pre>
