Question: Tutorial 5 - Polymorphism (part 1) Topics: Demonstrating Polymorphism Uw dimet and indimet nuperclass reference to subciam abject o Uwe array of superclass reference to
Tutorial 5 - Polymorphism (part 1) Topics: Demonstrating Polymorphism Uw dimet and indimet nuperclass reference to subciam abject o Uwe array of superclass reference to subels objects Send a subclass object to a method that meelven a superclass reference Exercise 1 Consider the 7 danes provided with the exercise which are Shape TwoDimensionalShape, Circle Rectangle Square, Triangle und Point Analyze the definition of the class and draw a simple clan diagram (with only Noter Expressed to compute the reas and the circumferences are Shape Are Perimeter Circle Rectangle hadith 2 lng with Square 4 Triangle these shade Problem (Homework) Consider the following UML dan diagram Theme de Identify which cases are not yet implemented in Tutorials 1. Create the mining classes starting by the bract classes, then the concrete class We need to define a method called Volume to compute the volume of the 3D objects. Place this method in the most appropriate class and when needed, declare it as a tratar concrete method. + Write a program to set your newly added shapes Upelate the Drawing Test program to test the specifities of the newly added classes and their mushade Note: To compute the area and volume une the following expressione Area Vom Sphere Cube Tetrahedron Via 62
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
