Pizza Shop Training

The Pizza Shop training is a focus on Object Oriented software development.

This is intended to be used by giving the participants a single set of requirements at a time. This will force the code to evolve over time and not do everything at once.


The approaches are intended to be an individualized, asynchronous flow between trainer/coach/whatever and the individual that is done on their pace.


  • Have them do each set of requirements however they normally code.
  • After the final requirements are done have a discussion and provide the MicroObjects technical practices.
  • Work with them to refactor their code from the first set of requiremnts into Object Oriented code, following the MicroObject practices.
    • This is a code review => changes => repeat loop until "good enough"
  • Have them attempt to apply the next set of requirements following (as best they can) the technical practices.
    • Review the changes. Call out and have them remove "pre-knowledge" components. e.g. if they add "taxes" before it's a requirement.
    • Continue the code review => changes => repeat loop until "good enough"
  • Do the previous bullet point for each set of requirements.

The CORE of this is the discussion on WHY. This is why it's an individual pace. They MUST be able to ask questions and get an understanding.
Discuss things. Use the PR/Code Review process to have discussion threads about why each change is suggested.

OOP Practice

  • Have them start with the intent to apply MicroObject practices.
  • Code review each completed requirement until good enough.
  • Repeat the "requirements => code review" for the rest of the requirements

The Scenario

  • This is a pricing system for a pizza shop. They've done it all manually for a while and decided on a little automation. Not much, just making life a little easier.
  • This system just needs to do the pizza math for the shop, not the full order.
  • This is just the Core. Someone else will build the UI on top of your logic. Do whatever you need, they'll have your source code and can make it work.
  • Impl Details
    • CSharp: There should be a Solution with a ClassLibrary project and Unit Test project

The Requirements

  • Initial

    • The shop has 2 pizza sizes, personal for $9 and family for $18
    • There are two types of toppings; Regular for 10% of the pizza price and Meat for 15% of the pizza price.
      • Regular Toppings: Mozzarella, Mushroom, Olives
      • Meat Toppings: Pepperoni, Bacon, Ham
    • The following functionality of the library is the following
      • Create a pizza
      • Add a topping to the pizza (before and after viewing the price/description of the pizza)
      • Get Price of pizza (as a text type)
      • Get Description of the pizza
  • Mid Range

    • New Pizza Size: Medium for $12
    • Family renamed to Large
    • Description format: "{Pizza Size} Pizza with {Toppings}"
    • Toppings need to be removable
  • Calzoned

    • New Product of Calzones at Half Size for $9 and Full for $14.
    • Description format: "{Size} {PIzza|Calzone} with {Toppings}
      • Toppings should be comma separated with an 'and' between the last two
  • Premium

    • New Premium Toppings for 32% of the pizza price
      • Premium Toppings: Roasted Garlic, Sundried Tomato's, Feta Cheese
    • Description format: "{Size} {Pizza|Calzone} with {Regular Toppings}{Meat Toppings}{Premium Toppings}"
    • Ability to resize a pizza or calzone
    • Ability to change a pizza into a calzone and calzone into pizza
  • Expansion

    • New Premium Topping
      • Thyme & Rosemary
    • New Regular Toppings
      • Asiago Cheese, Pineapple
    • New Shop Location!
      • The original location in Springfield has been so successful they've opened one in Branville!
      • Branville location uses some different descriptions
        • Personal => Mini
        • Bacon => Crispy Ham
      • Branville location doesn't have all the same ingredients
        • Roasted Garlic NOT available in Branville
      • Springfield location doesn't import the follow ingredient
        • Asiago Cheese NOT available in SPringfield
  • Specials

    • To simplify some ordering, we need to provide specials as default pizza setups
      • Hawiian => Ham and Pineapple
      • Meat Lovers => Bacn, Pepperoni, Ham
      • Original Veggie => Mishroom Mozzarella, Olives
    • Pineapple has gone up in cost, it's now the same % as meat
      • It's still a regular topping
  • Currency

    • A third location has opened up - Bricksburg
    • This location uses a different currency
      • Bricksburg uses a different currency; BLK
      • Springfield and Bran use use LZY
      • $1.00 LZY is 1,75& BLK. A $10.00 LZY pizza is 17,50& BLK.
  • Death and Taxes... Just Taxes

    • We need to include taxes in the price
      • Springfield has a 9% tax
      • Bedrock has a 9.5% tax
      • Bricksburg has an 1% tax
    • The Bricksburg location needs the description to be changed
      • {Pizza|Calzone} of {Size} size with {Regular Toppings} regular toppings, {Meat Toppings} meat toppings and {Premium Toppings} premium toppings