Create a subclass named shipped order that overrides


Problem

Complete the following tasks:

a. Create a class named Order that performs order processing of a single item. The class has four fields: customer name, customer number, quantity ordered, and unit price. Include set and get methods for each field. The set methods prompt the user for values for each field. This class also needs a compute Price() method to compute the total price (quantity multiplied by unit price) and a method to display the field values.

b. Create a subclass named Shipped Order that overrides compute Price() by adding a shipping and handling charge of $4.00.

c. Create the logic for an application that instantiates an object of each of these two classes. Prompt the user for data for the Order object and display the results; then prompt the user for data for the Shipped Order object and display the results.

d. Create the logic for an application that continuously prompts a user for order information until the user enters "ZZZ" for the customer name or 10 orders have been taken, whichever comes first. Ask the user whether each order will be shipped, and create an Order or a Shipped Order appropriately. Store each order in an array. When the user is done entering data, display all the order information taken as well as the total price that was computed for each order.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a subclass named shipped order that overrides
Reference No:- TGS02648768

Expected delivery within 24 Hours