Question: Question 1 (100 points) Activities (upload all files in a single zipped file name Exam 1.zip) Hint: in the equation, this symbol means (power) example:

Question 1 (100 points) Activities (upload all files in a single zipped file name Exam 1.zip) Hint: in the equation, this symbol means (power) example: 2^3 means 2 to the power of 3. 1. A Shape has a name and an area. A Circle is a shape with an area equal to: pi radius 2. A Rectangle is a shape with an areaequal to the product of its width and height. A Square is a Rectangle with equal width and height. Create a Java class hierarchy that implements the problem described above. Your solution must include at least one interface and/or abstract class. You should feel free to create additional classes as needed, but you should use the exact same nouns as those used in the problem statement whenever possible. 2. When converted to a string, a Shape should include its name and area. Implement the method(s) required to convert a Shape to a string. Two Shapes are considered equal if they have the same name and state. For example, two Rectangles are equal if they have the same width and height. Implement the special method(s) to allow your Shapes to be compared for equality. 3. A Three Dimensional Shape is a shape that has volume. A Cuboid is a three-dimensional Rectangle with a volume that is the product of its width, height, and depth. The area of a Cuboid is the total surface area of all 6 sides. A Cube is a Cuboid with equal width, height, and depth. A Sphere is a three-dimensional Circle with a volume equal to: 4/3*pi'radius^3. Its area is: 4pi" radius^2. Add implementations of the 3D shapes described above to your class hierarchy. 4. Choose one Shape and one Three Dimensional Shape and write a main method to test for each
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
