Question: Write an inherited class with name cubeplus using given cube class as base class with following conditions, (i) It will be possible to send parameters
Write an inherited class with name cubeplus using given cube class as base class with following conditions,
(i) It will be possible to send parameters for initializing length, height and width of cube while defining an object using inherited class. Briefly, it must be possible to send parameters to constructor.
(ii) Define a member functions with name getsuar. This functions will just return surface area of cube.
(iii) Define another member function with name showvol which prints the volume of the cube on screen.
(iv) Override a unary ++ operator (for both prefix and postfix). This operator will increase height, widht and length of rectangle by 10%.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
