Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Find the total revenue for the school lunch program. A high school lunch program serves lunch to students. When the student checks out, the lunch

Find the total revenue for the school lunch program.
A high school lunch program serves lunch to students. When the student checks out, the lunch person enters the cost of the meal. You have been hired to write the method that calculates the total amount of money received for every lunch order for all the days of the school year.
The following classes are used in the software for the lunch program. Complete the implementation for the method get Totaloforders.
public class order
i
private double amount;
public order(double cost)
i
amount = cost;
b
public double getimount()
i return amount; }
public void setamount(double cost)
i amount = cost; ;
public class Day
{
private List=1**>();
public void addorder(Order order)
{ ordersForTheDay.add(order); }
public List getordersForTheDay()
{ return ordersForTheDay; }
public void setDaysorders(List daysorders)
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students explore these related Databases questions