Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having some trouble with errors in my computer science homework. Here is the code I have right now: import java.util.List; public class testDriver extends

I'm having some trouble with errors in my computer science homework. Here is the code I have right now:

import java.util.List;

public class testDriver extends Restaurant { public static void main(String[] args) { // TODO Auto-generated method stub Customer c1=new Customer("Jacob","1111",3,false); Customer c2=new Customer("Mike","2222",2,false); Customer c3=new Customer("Anna","3333",5,true); Customer c4=new Customer("Emily","4444",4,false); Customer c5=new Customer("Owen","5555",2,false); Customer c6=new Customer("Sara","6666",3,false); Customer c7=new Customer("Chris","7777",4,true); Customer c8=new Customer("Romana","8888",2,false); Restaurant r= new Restaurant(15); // Add customers Restaurant.add(currList, c1, waitList); Restaurant.add(currList, c2, waitList); Restaurant.add(currList, c3, waitList); Restaurant.add(currList, c4, waitList); Restaurant.add(currList, c5, waitList); Restaurant.add(currList, c6, waitList); Restaurant.add(currList, c7, waitList); Restaurant.add(currList, c8, waitList); r.print(null, 0); System.out.println("after removing c1 "); r.remove(null, c1, null); r.print(null, 0); Customer cus = r.search("Emily"); if(cus != null){ System.out.println(" Customer Found "); } else{ System.out.println(" CustomerNot Found "); } r.print(null, 0); } //add by calling r.youraddmethod() --add multiple customer to test when the currList is full, go to the waitList //remove by calling r.removemethod() //search by calling r.search() //check by using the print or display method }

Comments at the end are what my professor gave us as an outline of what to do. The errors are on the print and remove methods where Eclipse is telling me that they are undefined in the restaurant class and there is also an error on the r.search part where it is saying that "The method search(int[], int[], int) in the type Restaurant is not applicable for the arguments (String)". What should I do to fix these errors? Java please and let me know if you need more information.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions