Question: Create the classes based on the following UML diagram. Note Shape is an abstract class, Write code to implement all the 3 classes that help
Create the classes based on the following UML diagram. Note Shape is an abstract class, Write code to implement all the 3 classes that help display the area of a rectangle and a triangle based on the method called for which class.

The abstract class and method are shown in italic Shape -color:String +getArea():doubleAn abstract method +toString) :String has definition only Rectangle Triangle -length:int -width:int -base:int -height:int +getArea():double +getArea():double .- Subclasses provide actua +toString() :String +toString():StringImplementation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
