top of page
Search
  • Writer's picturemillennial media

Java Tool For Small Businesses

This project is designed for a simple restaurant which contains customers. The customer class has the instance variables of customer number in line, the customer’s food order, drink order, and phone number to contact them. The customer class can calculate the wait time based on the customer number, create the food order manually, and compile the entire order by including both the drink and food order. The restaurant class contains a list of customers, the number of workers, the amount of meat, and the restaurant’s menu. The restaurant’s list of customers is determined by the zero arg and is used to determine the number of customers, find out if the restaurant is in rush hour (based on number of customers and number of workers), and allows the user to create the menu. The class also calculates the amount of meat left (based on meat inventory and food orders containing meat) and finds out if the customer is returning based on the customer phone number’s area code. After finding out if the customer is local, it creates a new priority list to put the local customers at the front of list. In the end, it prints out the number of customers, if the restaurant is in rush hour, the new priority list of customers, and what number the next customer will receive.

​

Here is a link to the code on Repl (~360 lines of code total): https://repl.it/join/akzkvdoa-anushac7


9 views0 comments

Recent Posts

See All
bottom of page