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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!