Question: The program need to write in ** JAVA ** languane 1. Orders Write a program that has a class called Order that a restaurant might

The program need to write in ** JAVA ** languane

The program need to write in ** JAVA ** languane 1. Orders

Write a program that has a class called Order that a restaurant

1. Orders Write a program that has a class called Order that a restaurant might use to represent orders from customers. Every order item includes three data members A Ordered object ID: an integer, B Number of items ordered: an integer less than 30 C and a price per item : a floating point number Write the following methods: Default constructor and all attributes constructor Getters and setters for each attribute. Write a method totalAmount where the total amount returns (the number of items) (price per item). Write a method to print all the Orders information. Write a main program that Populates 3 different Orders with all the attributes O Calculate the total amount of the orders. (Explanation: There are 5 items bought from 40 euro (200), 3 items bought from 70 euro (210) and 3 items from 50 euro (150). The total is 560 euro.) 1 2. Tax calculation Create a Worker class that stores the name and the prices for each of 5 different sold items. Create the Worker objects for the following data: Name John Jerry Jamie Prices for each sold items 50 60 70 65 47 53 64 31 22 62 72 40 80 71 42 O Write the following methods : o Default constructor and all-attributes constructor Getters and setters for each class attributes 3 o Calculate the total price for sold items-> return int Calculate the price average of the sold items -> Return float o Calculate total tax that needs to be paid for that worker, including tax, assuming that tax rate is 25% of the price-> Return float o Print the worker name, all prices for each sold item, average of the sold items and total tax for that worker -> Return void O Write a test (main) program that tests all the methods according to the table above

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