Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java program practice # 2 : The class contains an ArrayList of objects. Fastfood class into Meals Create a class named Meal using the UML.
Java program practice #: The class contains an ArrayList of objects. Fastfood class into Meals
Create a class named Meal using the UML. The package name will have to change.
Only one instance field an ArrayList of Fastfood
Add method: Adds a Fastfood class to the Meal class.
Get method: retrieves an instance of the Fastfood class at a specified position.
List method: returns all of the instances of Fastfood in the Meal class.
ListByPrice method: returns all the instances of Fastfood from the Meal class between a low price floor and a high price ceiling
SortByQuanity method: returns all the instances of Fastfood from the Mean class ordered by quantity lowest to highest
size method: returns a count of Fastfood in Meals.
findRestaurant method: returns the FIRST and only instance of Fastfood that matches the requested restaurant name. Be cautious of trailing blanks, you may
need to use the trim function.
Fastfood.java
MealTester.java
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