0
3.7kviews
Create Rectangle and Cube class that encapsulates the properties of a rectangle and cube i.e. Rectangle has default and parameterized constructor and area() method.
| written 9.7 years ago by | • modified 9.7 years ago |
Cube has default and parameterized constructor and volume method(). They share no ancestor other than Object. - Implement a class Size with size() method. This method accepts a single reference argument z. If z reference to a Cube, then size(z) return its volume. If z refers to an object of any other class, then size(z)- returns – 1. Use main() method in Size class to call size(..) method. -
Marks: 15 M
Year: Dec 2014
ADD COMMENT
EDIT
1 Answer

and 4 others joined a min ago.