Question: 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

 1. Orders Write a program that has a class called Order

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

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!