Question: Problem (Homework) Consider the following UML class diagram. Shape Two DimensionalShape ThreeDimensionalShape Circle Square Triangle Sphere Cube Tetrahedron Fig. 9.3 Inheritance hierarchy UML class diagram
Problem (Homework) Consider the following UML class diagram. Shape Two DimensionalShape ThreeDimensionalShape Circle Square Triangle Sphere Cube Tetrahedron Fig. 9.3 Inheritance hierarchy UML class diagram for Shapes 1. Identify which classes are not yet implemented in Tutorial s. 2. Create the missing classes starting by the abstract classes, then the concrete classes. 3. We need to define a method called get Volume to compute the volume of the 3D objects. Place this method in the most appropriate class and, when needed, declare it as abstract or concrete method. 4. Write a program to test your newly added shapes. s. Update the Drawing Test program to test the specifities of the newly added classes and their methods. Note: To compute the areas and volumes use the following expressions: Area Volume Shape Sphere 4 4* radius Cube 6. side side Tetrahedron V3 a? a2 6 v2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
