Question: Overnight: The Overnight class will contain the following private data:string name One string containing the recipients full name. Give the value Undefined as a default
Overnight: The Overnight class will contain the following private data:string name One string containing the recipients full name. Give the value Undefined as a default if one is not provided by the user calling codestring address One string containing the recipients full address. Give a default value of nowhere if one is not provided by the user.float Cost per ounce The positive base cost per ounce to send any package by any shipping methodint Number of ounces The positive number of ounces a package weighs to the nearest ounce but has a minimum and default value of If a number is entered, change it to float Extra cost per ounce A positive extra cost per ounce for the overnight expedited arrival. The Overnight class will contain constructors and one destructor. The destructor in this case will simply display a parting message Ex: Good bye cruel world! You wont 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 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 madeup shipping companys 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:Function name Return type Arguments DescriptionGetNameAndAddress string none Returns the concatenation of the name variable, a space and the address variable.SetName void string Sets the contents of the name member variable.SetAddress void string Sets the contents of the address member variable.SetCostPerOz void float Applies the given cost per ounce variable to the associated member variable, error checking as necessary.GetCostPerOz float none Returns the member cost per ounce
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
