Object-Oriented Programming 1: 6.1 Restaurant Assignment

  1. Drink class
    1. Define Drink class
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  2. ColdDrink / Lemonade
    1. Define ColdDrink class which inherits from Drink.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    3. Define Lemonade class which inherits from ColdDrink.
    4. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
  3. Revise FoodItem for inheritance
    1. Remove the type field and the constructor from the FoodItem class.
    2. Update the cook's MakeFoodItem method to no longer pass a string into the FoodItem constructor.
    3. Define a local variable for the food item to be instantiated.
    4. Check your work:
      1. Run the application.
      2. Click the buttons to seat and serve lunch to the regular.
      3. Note that the null FoodItem is not added to the Ticket's list due to validation efforts in week 4.2.
    5. Add Type Calculated Property
      1. Return this.GetType().Name
    6. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    7. Within the Cook's MakeFoodItem method, if the menu item is lemonade then create an instance of the Lemonade class.
    8. Check your work:
      1. Set a breakpoint in the server's TakeAndFillOrder method.
      2. Run the application.
      3. Click the buttons to seat and serve lunch to the regular.
      4. Ensure that lemonade and meatloaf objects are instantiated and served to the regular.
  4. HotDrink / Coffee
    1. Define HotDrink class which inherits from Drink
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    3. Place method calls as specified in the sequence diagram.
    4. Define Coffee class which inherits from HotDrink.
    5. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    6. Within the Cook's MakeFoodItem method, add a condition for a Coffee object.
    7. Check your work:
      1. Run the application
  5. Meal / CookedMeal / Meatloaf
    1. Define Meal class as specified in the class diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    3. Define CookedMeal class as specified in the class diagram.
    4. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    5. Define Meatloaf class as specified in the class diagram.
    6. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    7. Place method calls as specified in the sequence diagram.
    8. Within the Cook's MakeFoodItem method, add a condition for a Meatloaf object.
    9. Check your work:
      1. Run the application
  6. PotRoast
    1. Define PotRoast class as specified in the class diagram.
    2. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    3. Place method calls as specified in the sequence diagram.
    4. Within the Cook's MakeFoodItem method, add a condition for a PotRoast object.
    5. Check your work:
      1. Run the application
  7. UncookedMeal / TurkeyClub
    1. Define classes as specified in the diagram.
    2. Within the Cook's MakeFoodItem method, add a condition for a TurkeyClub object.
    3. Check your work:
      1. Run the application
  8. Submit