Question: Assignment Implement the following UML design using java programming language. class TwoDimensionalShape -height: float -width: float +parameterize constructer +get_area(): float class Triangle class Square +constructer

Assignment Implement the following UML design using java programming language. class TwoDimensionalShape -height: float -width: float +parameterize constructer +get_area(): float class Triangle class Square +constructer + get_area(): float +constructer + get_area(): float Write a client code (i.e. class with main method) that performs the following: a. Read 2 variables (x: correspond to height, and y correspond to width) b. Display a menu that contains 3 options 1. Square (to find and print out area) 2.Triangle 3. Exit c. construct an object corresponding to the menu choice and pass the appropriate parameters to the constructor and find out the area of the chosen shape
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
