Create a program in Java where three classes are declared:one base class “Figure” and two subclasses “Triangle” and “Circle”. The program should (maximum grade is 8): 1. allow a user to input: a. all...


Create a program in Java where three classes are declared:one base class “Figure” and two subclasses “Triangle” and “Circle”.


The program should (maximum grade is 8): 1. allow a user to input:


a. all three sides of a triangle to create an object of the subclass“Triangle”,


OR


b. a radius to create an object of thesubclass “Circle”;


2. compute and output on the screen:
a. the perimeter of the given triangle OR the circuit of the given circle,


AND


b. the area of the given triangle OR of the given circle.


Additional requirements to get the highest grade:




  1. verification and validation of user inputted values (maximum grade is 9);




  2. implementation of a polymorphism (maximum grade is 10).





May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here