Question: Create a class named Order that performs processing of a single item. The class has five fields: customer name, customer number, quantity ordered, unit price,
Fumet Create a class named Order that performs processing of a single item. The class has five fields: customer name, customer number, quantity ordered, unit price, and 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 named computePrice to compute the total price (unit price times quantity ordered) and a method to display the field values. Create a subclass named ShippedOrder that overrides computePrice by adding a shipping and handling charge of RM12.00. Write an application named UseOrder that creates an object for each of these classes. Prompt the user for data for the shippedOrder object, and display the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
