Object-Oriented Programming 1: 7.1 Restaurant Assignment
- Create an IWaiter interface.
- Define an IWaiter as specified in the diagram.
- Check your work: Build the solution and ensure that the code compiles without errors or warnings.
- Update the TendToTheRegular sequence to reference IWaiter.
- Server implements IWaiter
- Restaurant.TendToTheRegular
- Cast result from FindServer as IWaiter.
- Check your work:
- Create ISeater interface
- Define an ISeater as specified in the diagram.
- Check your work: Build the solution and ensure that the code compiles without errors or warnings.
- Update SeatTheRegular sequence to use ISeater.
- Server implements ISeater
- Restaurant.SeatTheRegular
- Cast result from FindServer as ISeater.
- Check your work:
- Create an ITableSetter interface.
- Define an ITableSetter class as specified in the diagram.
- Check your work: Build the solution and ensure that the code compiles without errors or warnings.
- Create an ICondimentFiller interface.
- Define an ICondimentFiller class as specified in the diagram.
- Check your work: Build the solution and ensure that the code compiles without errors or warnings.
- Implement ITableSetter and ICondimentFiller in Cook.
- Cook/Server implements ITablesetter
- Define a Ticket.AmountPaid getter
- Write cook BusTable method. He pockets the money.
- Check your work:
- Set Cook/Server to implement ICondimentFiller.
- Check your work: Build the solution and ensure that the code compiles without errors or warnings.
- Call methods as specifed in the following sequence diagram.

- Check your work:
- test out Svanhilde set up table button
- Cook Sets Up a Table
- Update Cook.SetUpTable to use ITableSetter.
- Add a condition to the restaurant's SetUpTable method so that if the server is null, the owner will set up the table.
- Within the restaurant's SetUpTable method, cast the returned ITableSetter as an ICondimentFiller and call the FillCondiments method.
- Create a cookSetsUpTableButton and event handler.
- Within the event handler, call the Restaurant's SetUpTable method, passing in string.Empty as a parameter.
- Check your work:
- Run the application
- Refactor the SetUpTable method
- Define a FindTableSetter method in the Restaurant class.
- Define a GetBackupTableSetter in the Restaurant class.
- Within the SetUpTable method, call methods as specified in the sequence diagram.
- Remove the code which checked if the server was null and used the owner.
- If the desired waitress was not found, call the GetBackupTableSetter method.
- GetBackupTableSetter returns the owner.
- Check your work:
- Run application.
- Submit