Create a class named Order that performs order processing of a single item. The class has the following five fields: Customer...

profileDavixmmynem975

Create a class named Order that performs order processing of a single item. The class has the following five fields:

Customer name
Customer number
Quantity ordered
Unit price
Total price

Include set and get methods for each field except the total price field. The set methods prompt the user for values for each field. This class also needs a method to compute the total price (quantity times unit price) and a method to display the field values.

Create a subclass named ShippedOrder that overrides computePrice() by adding a shipping and handling charge of $4.00. Write an application named UseOrder that instantiates an object of each of these classes. Prompt the user for data for the Order object, and display the results, then prompt the user for data for the ShippedOrder object, and display the results.

    • 10 years ago
    • 10
    Answer(3)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      order.zip

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      cpp_files.rar

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      capture.png