Write a class definition for the following class of objects.
The type of object is a freight package in a box.
For each such object, there are private variables that describe the package. They are length, width, height, and weight. (all of type double)
There are two constructor functions for this class:
*first constructor function: has no arguments. In this case, assign default values of length = 24, width = 12, height = 16, and weight = 20.
*second constructor function: has four arguments: length, width, height, weight.
The class has eight basic accesors and mutator functions. Write only the ones for length and width. End of question: Start your answer with :
class FreightPackage
{
Basically this is an example of what my quiz will be like for C++, and I'm very confused on what to do with. This isn't homework. So any help would be very much appreciated.
The type of object is a freight package in a box.
For each such object, there are private variables that describe the package. They are length, width, height, and weight. (all of type double)
There are two constructor functions for this class:
*first constructor function: has no arguments. In this case, assign default values of length = 24, width = 12, height = 16, and weight = 20.
*second constructor function: has four arguments: length, width, height, weight.
The class has eight basic accesors and mutator functions. Write only the ones for length and width. End of question: Start your answer with :
class FreightPackage
{
Basically this is an example of what my quiz will be like for C++, and I'm very confused on what to do with. This isn't homework. So any help would be very much appreciated.
0


