Question: JAVA LANGUAGE In-Class Exercise: Shape-heritance - Create a program that creates at least 3 different shape objects (ie. circles, squares, triangles, etc.), using multiple classes

JAVA LANGUAGE JAVA LANGUAGE In-Class Exercise: Shape-heritance - Create a program that creates

In-Class Exercise: Shape-heritance - Create a program that creates at least 3 different shape objects (ie. circles, squares, triangles, etc.), using multiple classes in an inheritance model. - Your program should have at least 4 classes (besides Main): 1 superclass and 3 subclasses that inherit from it. - Each super/sub class must have a proper constructor method, with parameters. Subclasses should pass values from their constructor to the superclass' constructor, where appropriate. - Your superclass must have at least 2 properties common to all shapes, and implement a getArea() method (which will be inherited by subclasses). - Each subclass must have at least one shape-specific property and method, as well as implement the getArea() inherited method. (Look up the math!) - Once your super/sub classes are finished, write code in PSVM to instantiate at least one object of each subclass, and call each object's inherited getArea() method

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!