Question
Write a Cuboid (Rectangular) class that has the following member variables: length ( l ) width ( w ) height ( h ) T he
Write a Cuboid (Rectangular) class that has the following member variables:
length ( l )
width ( w )
height ( h ) T
he class should have the following member functions:
Default Constructor: A default constructor that sets length, width, and height all to 1.0.
Another Constructor: Accepts the length, width, and height of the cuboid as arguments.
getV : Returns the volume of the cuboid. getS : Returns the surface area of the cuboid.
A Destructor: Print e.g. Cuboid(1.2 x 2.3 x 5.6) is deleted. . The number is the length, width and height of the cuboid.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started