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,

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.
 Create a class named Order that performs processing of a single

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

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 Accounting Questions!