Skip to content

Instantly share code, notes, and snippets.

@dcantu476
Last active February 3, 2020 19:02
Show Gist options
  • Save dcantu476/19f5a32d3d39356748170a2a3f469f17 to your computer and use it in GitHub Desktop.
Save dcantu476/19f5a32d3d39356748170a2a3f469f17 to your computer and use it in GitHub Desktop.
Pizza Shop
build() {
// Add the Toppings!
if (userAllowsNotifications) {
notifyTheCustomerOfTheStatus("Pizza is ready for the oven!");
}
if (employeeIsClockedIn && employeeIsResponsibleForTask) {
notifyTheEmployeesOfTheStatus("Pizza is ready for the oven!");
}
}
bake() {
// Put it in the oven and let it bake!
if (userAllowsNotifications) {
notifyTheCustomerOfTheStatus("Pizza is done baking!");
}
if (employeeIsClockedIn && employeeIsResponsibleForTask) {
notifyTheEmployeesOfTheStatus("Pizza is done baking!");
}
}
box() {
// Let it cool and then box it up!
if (userAllowsNotifications) {
notifyTheCustomerOfTheStatus("Pizza in the box!");
}
if (employeeIsClockedIn && employeeIsResponsibleForTask) {
notifyTheEmployeesOfTheStatus("Pizza in the box!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment