Every cylinder has a base and height, wherein the base is a circle. Design a class, cylinderType, that can capture the properties of a cylinder and perform the usual operations on the cylinder. Derive this class from the class circleType ( that can store the radius and center of the circle. Because the center is a point in the x-y plane and you designed the class to capture the properties of a point , you must derive the class circleType from the class pointType, that can store and process a point in the x-y plane.). Some of the operations that can be performed on a cylinder are as follows: calculate and print the volume, calculate and print the surface area, set the height, set the radius of the base, and set the center of the base. Also, write a program to test various operations on a cylinder. Note: Use c++ language
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Every cylinder has a base and height, wherein the base is a circle. Design a class, cylinderType, that can capture the properties of a cylinder and perform the usual operations on the cylinder. Derive this class from the class circleType ( that can store the radius and center of the circle.
Because the center is a point in the x-y plane and you designed the class to capture the properties of a point , you must derive the class circleType from the class pointType, that can store and process a point in the x-y plane.). Some of the operations that can be performed on a cylinder are as follows: calculate and print the volume, calculate and print the surface area, set the height, set the radius of the base, and set the center of the base. Also, write a program to test various operations on a cylinder.
Note:
Use c++ language
solve as soon as possible
explain with double line comments
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images