public Customer generateCustomer() { Customer customer = null; if (shouldGenerateCustomer()) { customer = new Customer { firstName = generator.GetFirstName(), lastName = generator.GetLastName() }; } return customer; }
public void usheringCustomer(Customer customer) { // check if there are available tables. If it does, fill it if (tables.Count < tableNumber) { tables.Add(customer); } // else put them in the waiting line, if it's not full else if (line.Count < lineSize) { line.Add(customer); } // the line is too long! Customer is gone }