EDIT oh my god I meant to say that UAV is another Parent class
I have various classes some are parent and the others are children example
Parent Class Airplane
Child Class Helicopter
Parent Class Uav
The Airplane class has a accessor method called getPrice() which simply returns the instance variable price.
The problem arises when I get an array of objects that hold all these different types so for example
Airplane aObj=new Airplane();
Helicopter hObj=new Helicopter();
Uav uObj=new Uav();
Object flying_Array[]=new Object[4];
flying_Array[0]=aObj;
flying_Array[1]=hObj;
flying_Array[2]=uObj;
Now when I try to do flying_Array[0].getPrice();
// eclipses gives me an error and my method doesn't show up in the proposals.
//This is my first post so I'm sorry in advance if my formatting is weird.