Object-Oriented Programming 1: 7.2 Restaurant Assignment

  1. Busy Status for Table Setters.
    1. Define an IsBusy property in the ITableSetter interface.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  2. Make the Server and Cook classes implement the IsBusy property.
    1. Define an isBusy field with a full property in both the Server and Cook classes.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  3. Create a List of Table Setters.
    1. Define tableSetters list of type ITableSetter in the Restaurant class.
    2. When instantiating the new restaurant, add any table setters to this list.
    3. Check your work: Test Build
      1. Run the application
  4. Adding Table Setters
    1. Define an AddTableSetter wrapper method in the Restaurant class.
    2. When instantiating the new restaurant, use this method to add table setters.
    3. Check your work:
      1. Run the application
  5. setUpTableButton
    1. Remove cookSetUpTable button and event handler.
    2. Rename the heidiSetUpTableButton to setUpTableButton
    3. Note: Be sure to rename the event handler as well.

    4. Remove the string parameter from the Restaurant's SetUpTable method.
    5. Remove the string parameter from the Restaurant's FindTableSetter method.
    6. Loop through the list of servers to find one that is not busy and store it in a local variable.
    7. If the local table setter variable remains null, then call GetBackupTableSetter to set the variable before returning it.
    8. Check your work:
      1. Within the Set Up Table button click, set the IsBusy property of both waitresses to true.
      2. Run the application
      3. Within the Set Up Table button click, set the IsBusy property of both waitresses to false.
  6. Make the same changes to automate the seatTheRegularButton, minus getting a backup seater.
  7. Submit