Question: i want it to be in simple code please +(((in java))) Object Oriented Programming- 14011102-4 Lab#3 Consider the inheritance hierarchy in this figure Rectangle Shape

i want it to be in simple code please +(((in java)))  i want it to be in simple code please +(((in java)))

Object Oriented Programming- 14011102-4 Lab#3 Consider the inheritance hierarchy in this figure Rectangle Shape iangle that has three classes: Shape, Rectangle Write a Java program and Triangle A Shape should have o o o a height, width, area of type double A default constructor A constructor that will take two parameters and assign them to data members o a set and a get method for all fields. Then, create two more classes Rectangle and Triangle that inherit the class Shape, where both classes should: o Override the method getArea0 to return a double value represents the area of that shape o Add the method toString to print an object. Finally Test your classes with a TestShape class. Create two objects one from the type Rectangle and the other from the type Triangle. You should test your objects by filling the needed information and calling the two available methods

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!