Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Improving Menu Item Search App - Functions for Printing and Searching Menu Items

Function 1: PrintMenuItemDetails

1. Write a function PrintMenuItemDetails (MenuItem) to print the details of the menu item. It takes in a MenuItem object as its argument and has no return value. This function improves maintainability.

You must use the get functions created in requirement 1 to retrieve the menu item details for printi
 
2. Write a function SearchBasedOnNameOrCategory(searchString, listOfMenuItems) to search the matching menu items from a provided list of items with the matching searchString. It takes in a searchString of type String and listOfMenuItems of type List as its arguments and returns a searchResult of type List.

3. Convert the list of Strings with menu items details to store list of menu item objects instead.

4. Read in the menu item details from input.txt file (use the readLines() function) and put them into a list listOfMenuItems. You are required to create the Menu item object to store the menu item attributes and append each of them into listOfMenuItems. Make sure to close the file after reading the data.

Hint: You have to use the split() function to retrieve the menu item attributes and strip() and/or replace() function to remove any trailing spaces and “\n” in the attributes.

5. During the printing of the menu item details, all parts of the code that prints the menu item details uses the PrintMenuItemDetails() function created in item 2.

For example:

Name: Hawaiian Pizza

Category: Pizza

Description: A mix of pineapple with turkey ham on top of a thin crust pizza that is roasted to perfection.

Price: $10

6. After selecting option 3 “Search based on Name or Category substring”, the user can key in the search string (e.g. “Noodles”) and search for products. The search should be case-insensitive.

Write a function SearchBasedOnNameOrCategory(searchString, listOfMenuItems) created in requirement 3 to perform the search and retrieve the search results instead.

7. Place the codes for menu option 1, 2 and 3 into respective functions and call them in the main program.

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close