Question: Write a c++ program that - defines the class Cuboid which has the following: - default constructor (has no parameters) - constructor that has 3

Write a c++ program that

- defines the class Cuboid which has the following:

- default constructor (has no parameters)

- constructor that has 3 parameters (height, length, width)

- data members

- height, length, width

- member functions

- to set the value of each of the data members - 3 functions

- to get the value of each of the data members - 3 functions

- one that returns the volume

- one that returns the surface area

- one that increases each dimension by a specified factor

(Function definitions outside of the class!!!)

- in main()

- instantiate a Cuboid object and initialize at the time of definition

- make sure the constructor with parameters is called

- define an array of 2 Cuboid objects

- using a loop get information to populate the 2 objects in the array

- prompt for the height, length, and width

- prompt for a size by which to increase each dimension (one input)

- call a global function passing a Cuboid object and the increase

factor as separate arguments; function will call the class member

function to increase the dimensions; parameters of the function

should be references

- display the dimensions , the volume, and the surface area for each of

the three objects

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!