Using C++ to create the following: Create a class named Vehicle . The class has the following five member variables: Vehicle Name Vehicle number Sale Tax Unit price Total price Include set (mutator)...


Using C++ to create the following:


Create a class namedVehicle. The class has the following five member variables:



  • Vehicle Name

  • Vehicle number

  • Sale Tax

  • Unit price

  • Total price


Include set (mutator) and get (accessor) functions for each field except the total price field. The set function prompt the user for values for each field. This class also needs a function named computePrice() to compute the total price (quantity times unit price + salesTax) and a function to display the field values. [Note: Sale tax is 10%, sale tax = Unit price * saleTax)


Create a subclass named VehicleOrder that overrides computePrice() function by adding a shipping and handling charge of $12.00.


Write an application named UseVehicle that instantiates an object of each of these classes.


Prompt the user for data for the Vehicle object, and display the results, then prompt the user for data for the VehicleOrder object, and display the results.



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here