Object-Oriented Programming 1: 7.1 Restaurant Assignment

  1. Create an IWaiter interface.
    1. Define an IWaiter as specified in the diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  2. Update the TendToTheRegular sequence to reference IWaiter.
    1. Server implements IWaiter
    2. Restaurant.TendToTheRegular
    3. Cast result from FindServer as IWaiter.
    4. Check your work:
  3. Create ISeater interface
    1. Define an ISeater as specified in the diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  4. Update SeatTheRegular sequence to use ISeater.
    1. Server implements ISeater
    2. Restaurant.SeatTheRegular
    3. Cast result from FindServer as ISeater.
    4. Check your work:
  5. Create an ITableSetter interface.
    1. Define an ITableSetter class as specified in the diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  6. Create an ICondimentFiller interface.
    1. Define an ICondimentFiller class as specified in the diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  7. Implement ITableSetter and ICondimentFiller in Cook.
    1. Cook/Server implements ITablesetter
    2. Define a Ticket.AmountPaid getter
    3. Write cook BusTable method. He pockets the money.
    4. Check your work:
    5. Set Cook/Server to implement ICondimentFiller.
    6. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    7. Call methods as specifed in the following sequence diagram.
    8. s
    9. Check your work:
      1. test out Svanhilde set up table button
  8. Cook Sets Up a Table
    1. Update Cook.SetUpTable to use ITableSetter.
    2. Add a condition to the restaurant's SetUpTable method so that if the server is null, the owner will set up the table.
    3. Within the restaurant's SetUpTable method, cast the returned ITableSetter as an ICondimentFiller and call the FillCondiments method.
    4. Create a cookSetsUpTableButton and event handler.
    5. Within the event handler, call the Restaurant's SetUpTable method, passing in string.Empty as a parameter.
    6. Check your work:
      1. Run the application
  9. Refactor the SetUpTable method
    1. Define a FindTableSetter method in the Restaurant class.
    2. Define a GetBackupTableSetter in the Restaurant class.
    3. Within the SetUpTable method, call methods as specified in the sequence diagram.
    4. Remove the code which checked if the server was null and used the owner.
    5. If the desired waitress was not found, call the GetBackupTableSetter method.
    6. GetBackupTableSetter returns the owner.
    7. Check your work:
      1. Run application.
  10. Submit