Question: In this assignment you are going to implement the following design using the interface files l twoD a and I threeD ava Shape + Color

 In this assignment you are going to implement the following design using the interface files l twoD a and I threeD ava Shape

In this assignment you are going to implement the following design using the interface files l twoD a and I threeD ava Shape + Color mColor + String mName > Shape(Color, String) +getName) String +getColor() Color +setName(String) +setColor(Color) + print() I twoD I threeD + computeArea) +computePerimeter() +computeVolume() Cube Square Circle + float mSide + float mRadius > Cube(Color, String, float) > > Square(Color, String, float) Circle(Color, String, float) Shape class is the super abstract class in the hierarchy. And we have 2 interfaces, I twoD and I threeD. Cube class is a 3-dimensional object, hence it implements the l threeD interface, in contrast Square and Circle classes are 2-dimensional objects, and they implement the I twoD interface In addition, Cube is an extension of the Square class. As an overall, you are going to implement 4 classes Shape, Cube, Square and Circle in 4 files; Shape.java, Cube.java, Square.java, and Circle.java respectively and also main test driver class in the file Assignment3.java

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!