Answered step by step
Verified Expert Solution
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 orderdouble cost
i
amount cost;
b
public double getimount
i return amount;
public void setamountdouble cost
i amount cost; ;
public class Day
private List;
public void addorder order
ordersForTheDay.add;
public List getordersForTheDay
return ordersForTheDay;
public void setDaysorders daysorders
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