Question: Lab #8 Program 3 Gift Box Class and Client Program (give you more practice) 15 ptsStep 1: Design a GiftWrap classDesign (using a UML) a

Lab #8 Program 3 Gift Box Class and Client Program (give you more practice) 15 ptsStep 1: Design a GiftWrap classDesign (using a UML) a GiftWrap class that a gift wrapping store could use to calculate the price of wrapping rectangular gift boxes and generate invoices/receipts for their customers. The class will allow a gift wrapping store to calculate the cost of wrapping various sized rectangular boxes. The class will have member functions to calculate the price of the gift wrap box being wrapped, tax on the gift wrap sold, and the total cost of the gift wrap both including and excluding tax. The class should have the following member variables:? length this variable holds the length of the box in inches? width this variable holds the width of the box in inches? height this variable holds the height of the box in inches? taxRatethis variable holds the sales tax rate for the company? pricePerInch this variable holds the price per inch of the gift wrapThe class should have the following member functions:? Two Constructors:o One constructor should be a no argument (no arg) constructor. This constructor should set the length, width and height member variables to 1.0, the pricePerInch member variable to 0.036, and the taxRate member variable to 0.08. o One constructor that accepts the following two values as arguments (so the constructor should have two parameter variables) and assigns them to the appropriate member variables: the tax rate and the price per inch. This constructor should set the length, width and length member variables to 1.0.?Do not allow the pricePerInch member variable to be set to numbers less than zero. Use reasonable default values. Its up to you to know how to design this based on class lecture on object oriented programming.?Do not allow the taxRate member variable to be set to a number less than zero or greater than one. Use reasonable default values. Its up to you to know how to design this based on class lecture on object oriented programming.? Five Set Functions:o Design a set function for each member variable: length, width, height, pricePerInch, and taxRate.?Do not allow the length, width, height, and pricePerInch member variables to be set to numbers less than zero. Its up to you to know how to design this based on class lecture on object oriented programming.?Do not allow the taxRate member variable to be set to a number less than zero or greater than one. Its up to you to know how to design this based on class lecture on object oriented programming..? Five Get Functions:o Design get function for each member variable: length, width, height, pricePerInch, and taxRateo Its up to you to know how to design these functions based on class lecture on object oriented programming.? calcSubtotal Member Function:o This member function should calculate the price of the gift wrap BEFORE tax. The price of the gift wrap before tax is calculated as follows:1. First calculate the surface area of the box. o Surface Area = (2 * length * width) + (2 * length * height) + (2 * width * height)2. Next multiply the surface area of the box by the price per inch. This is the subtotal for the gift wrap.? calcTax Member Function:o This member function should calculate the tax on the gift. The tax is the subtotal * the tax rate. Be efficient and use existing functions if you can.? calcTotal Member Function:o This member function should calculate the overall total price of the gift wrap which is the subtotal + the tax. Be efficient and use e

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!