Shape Polymorphism with Interface

ShapePolymorphism-Interface

Shape 추상클래스 has-a ShapeType, ShapeColor, ShapeRect

Shape 추상클래스를 상속받은 Triangle, Rectangle, Square, Circle 클래스는 추상메소드인 void area()를 반드시 구현하였다.

Shape 추상클래스는 Moveable, Scalable 인터페이스를 상속하여 추상메소드인 Moveable 인터페이스의 void move(int, int)와 Scalable 인터페이스의 void scale(int)를 구현하였다.