Question
I need a little help on this last bit of my computer science homework. Here is the problem. This by the way is the restaurant
I need a little help on this last bit of my computer science homework. Here is the problem.
This by the way is the restaurant class in case you need it.
package lab1;
import java.util.List;
public class Restaurant extends Customer { int maxSeat = 0; public static Customer[] currList; { int currList = 0; } public static Customer[] waitList; { int waitList = 0; } public Restaurant (int maxSeat, int currList[], int waitlist[]) { super(getPhone(), getName()); this.maxSeat = maxSeat; this.currList = new Customer[maxSeat]; this.waitList = new Customer[10]; } public void display(Customer[] customerList, int n) { int numElements = Math.min(customerList.length, n); for (int i = 0; i currList, Customer newCustomer, List
if (currList.size()
System.out.println("New Customer has been added to the end of the List."); } else if (waitlist.size()
System.out.println("New Customer has been added to the wait list."); } } public static void remove(List
if (!waitlist.isEmpty()) { Customer nextCustomer = waitlist.get(0);
waitlist.remove(0);
currList.add(nextCustomer); } } } }
How do I do this? Java please and let me know if you need more information.
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