ok this one has got me lost and I just cant seem to figure it out at all.
basically I have a program where a user creates three shapes and they are then displayed in the order inputted and then the program is suppose to oranize them by area, smallest to biggest.
This chapter has to do with
polymorphism and inheritance if that helps at all.
I have 3 shapes I can make, Circle, Rectangle, and a Square.
The base class is called Shape.
The program that these classes actually run in is this:
so what has me lost is, how do I organize the shapes in the last part of the program by calling the area() method using dynamic binding?
BTW, I have read the small section on dynamic binding in my book (
Java, Savitch 2008) and my professors notes and I am totally lost. So I'd appreciate it if you could keep it simple.
Thanks!