Shape
Constructor
- public Shape( int _col)
instance Variables
- protected int color
Accesor Methods
- public abstract double getArea(); //returns the area of the triangle
- public int getColor()
- public void render() { System.out.println(“rendering shape” ) ; }
Now, let’s refactor our class relationships to represent our new Iheritance Tree
- refactor all subclasses to reflect new class hierarchy
- Update our new InteractiveMath class –InteractiveMath3