Question: 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 #2: 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
 Java program practice #2: The class contains an ArrayList of objects.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!