Question: Write a class named 'cylinder' that inherits from the 'circle' and 'rectangle' classes. The 'cylinder' class must not have any member data. All member functions

Write a class named 'cylinder' that inherits from the 'circle' and 'rectangle' classes. The 'cylinder' class must not have any member data. All member functions of the 'cylinder' class will be located in the 'public' section. The member functions to be defined are explained below. I. The 'write size' function will take two real numbers (floats) as parameters. The first parameter should be the height of the cylinder and the second parameter should be the radius of the cylinder (r). ii. The 'find surface area' function will return the surface area of the cylinder. iii. The 'find volume' function will return the volume of the cylinder. (base area x height). iv. The '++' operator will increase the cylinder height by 1.
#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
