Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

Know when firms should not offer service guarantees.

Answered: 1 week ago

Question

Recognize the power of service guarantees.

Answered: 1 week ago