Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started