Question: The Overnight class will contain the following private data: table [ [ string , name, table [ [ One string containing the recipient's

The Overnight class will contain the following private data:
\table[[string,name,\table[[One string containing the recipient's full],[name. Give the value "Undefined" as a],[default if one is not provided by the user],[(calling code).]]],[string,address,\table[[One string containing the recipient's full],[address. Give a default value of "nowhere"],[if one is not provided by the user.]]],[float,Cost per ounce,\table[[The positive base cost per ounce to send],[any package by any shipping method]]],[int,Number of ounces,\table[[The positive number of ounces a package],[weighs to the nearest 1 ounce but has a],[minimum (and default) value of 6. If a],[number 6 is entered, change it to 6.]]],[float,Extra cost per ounce,\table[[A positive extra cost per ounce for the],[overnight expedited arrival.]]]]
The Overnight class will contain 2 constructors and one destructor. The destructor in this case will simply display a parting message (Ex: Good bye cruel world! You won't have Overnight shipping anymore!"). Feel free to be creative with the parting message. The constructors will be:
A default constructor with no arguments. It will provide default values to the member variables.
Another constructor will take 5 arguments which are, in order: string name, string address, integer number of ounces, float cost per ounce, float extra cost per ounce.
Both constructors will issue to the screen a welcome statement of your own (creativity welcome) that includes your made-up shipping company's name, package type and your name such as
"Welcome to We Gotchu Shipping, Overnight package by Mrs. C. Delugach!
".
The Overnight class will also contain the following public functions:
\table[[Function name,Return type,Argument(s),Description],[GetNameAndAddress(),string,none,\table[[Returns the concatenation of the name],[variable, a space and the address],[variable.]]],[SetName (),void,string,\table[[Sets the contents of the name member],[variable.]]],[SetAddress(),void,string,\table[[Sets the contents of the address member],[variable.]]],[SetCostPer0z(),void,float,\table[[Applies the given cost per ounce variable],[to the associated member variable, error],[checking as necessary.]]],[GetCostPer0z(),float,none,\table[[Returns the member cost per ounce],[value.]]]]
\table[[GetNumOz(),int,none,\table[[Returns the contents of the member],[variable that holds the number of],[ounces the package weighs]]],[SetNumOz(),void,int,\table[[Sets the member variable for number of],[ounces to the provided value - making],[sure that it is at least 6.]]],[GetExtraPer0z (),float,none,\table[[Returns the value in the member extra],[cost per ounce variable.]]],[SetExtraPer0z (),void,float,\table[[Sets the given value to the associated],[extra cost per ounce member variable]]]]
 The Overnight class will contain the following private data: \table[[string,name,\table[[One string

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!