Question: Create a Table class using my skeleton code and also create a Junit Test TableTest class. *** Table.java Code *** import java.util.List; public class Table

Create a Table class using my skeleton code and also create a Junit Test TableTest class.

*** Table.java Code ***

import java.util.List; public class Table extends Restaurant { public int size() { return 0; } public List getUtensils() { return null; } public boolean toddlerChair() { return true; } public boolean booth() { return true; } }

**** Restaurant.java Code ****

import java.util.List; public class Restaurant { private List employees; private List foodsServed; private List drinksServed; private int numberofTables; private int waitingCustomers; Restaurant(List employees, List foodsServed, List drinksServed, int numberofTables) { this.employees = employees; this.foodsServed = foodsServed; this.drinksServed = drinksServed; this.numberofTables = numberofTables; this.waitingCustomers = 0; // Initially the waiting customers are 0 when a new restuarant is created } // Method to add an employee to the restuarant's list of employees public void addEmployee(Employee employee) { employees.add(employee); } // Method to get restuarant's list of employees public List getEmployees() { return employees; } // Method to get number of restuarant's employees public int getEmployeesCount() { return employees.size(); } // Method to get food items served in the restaurant public List foodServed() { return foodsServed; } // Method to get price of a food item served in the restaurant public int getFoodItemPrice(String foodItem) { for (int i = 0; i < foodsServed.size(); i++) { if (foodsServed.get(i).getName().equals(foodItem)) { return foodsServed.get(i).getPrice(); } } return 0; } // Method to get drink items served in the restaurant public List drinksServed() { return drinksServed; } // Method to get price of a drink item served in the restaurant public int getDrinkItemPrice(String drinkItem) { for (int i = 0; i < drinksServed.size(); i++) { if (drinksServed.get(i).getName().equals(drinkItem)) { return drinksServed.get(i).getPrice(); } } return 0; } // Method to get kitchen cooking timet public int kitchenCookTime() { return 50; } // Method to get number of tables in the restaurant public int getNumberOfTables() { return numberofTables; } // Method to get number of waiting customers in the restaurant public int getWaitingCustomers() { return waitingCustomers; } } 

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!