Question: in java please! I Fins get the code for GeometricObject.java, Cintle java and Cyllinderjava tham lnclassLabs folder in Canyas. Your task here is to implement



I Fins get the code for GeometricObject.java, Cintle java and Cyllinderjava tham lnclassLabs folder in Canyas. Your task here is to implement the Rectangle elass and Bex class via laserianef accoeding to the diagram shown below, Usc same UML for the Rectanyle class as was shown in Lab it. Bet add the print() method. Here is UML for the Hax class Definult beight of box will be 1 and width and length will be definlt valos for Rectangle. Remember to make use of the parent constructoe. gctureal method will return the lotal surfacs arve of the Bos object. Rementer to re-ese method from parent class and don't duplicate any code. get Volumeo is the volume of bex which is length " width" height. Remember to re-use method from parent elass and don'7 duplicane any code. Teat peogram by sreate an objects each of Civenctrie0tyoct. Circle, Cyllisalr, Mectangle and Ben Then create an anray of bpe GeonstricObject with a length of 5, Aen asvign each of the objects created to each elemem of the array: Then in a loop ( 5 times), access each objeet in the array and them cail the prima method from cach object. Note that each object in the army are different, but it will still work bence demensente the idea of Polymorphtsm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
