# Domino's Pizza - Low Level Design
## Pizza Store
```mermaid
classDiagram
class Pizza {
+string name
+Dough* dough
+Cheese* cheese
+Clams* clams;
+Sauce* sauce
+abstract void prepare()
+bake()
+cut()
+box()
+setName()
+getName()
+getPizzaDescription()
}
class PizzaStore {
+abstract createPizza()
+orderPizza()
}
Pizza <|-- PizzaStore
class NYPizzaStore {
+createPizza()
}
class ChicagoPizzaStore {
+createPizza()
}
PizzaStore <|-- NYPizzaStore
PizzaStore <|-- ChicagoPizzaStore
```
## Types of Pizza
Name of the pizzas is same across all regions, but the ingredients differ.
```mermaid
classDiagram
class Pizza {
+string name
+Dough* dough
+Cheese* cheese
+Clams* clams;
+Sauce* sauce
+abstract void prepare()
+bake()
+cut()
+box()
+setName()
+getName()
+getPizzaDescription()
}
class CheesePizza {
+PizzaIngredientFactory* ingredientFactory
+void prepare()
+CheesePizza()
}
class ClamsPizza {
+PizzaIngredientFactory* ingredientFactory
+void prepare()
+ClamsPizza()
}
Pizza <|.. CheesePizza
Pizza <|.. ClamsPizza
```
## Pizza Ingredients - Abstract Factory
```mermaid
classDiagram
class PizzaIngredientFactory {
<<interface>>
+createDough()
+createSauce()
+createCheese()
+createVeggies()
+createPepperoni()
+createClam()
}
class NYPizzaIngredientFactory {
+createDough()
+createSauce()
+createCheese()
+createVeggies()
+createPepperoni()
+createClam()
}
class ChicagoPizzaIngredientFactory {
+createDough()
+createSauce()
+createCheese()
+createVeggies()
+createPepperoni()
+createClam()
}
PizzaIngredientFactory <|.. NYPizzaIngredientFactory
PizzaIngredientFactory <|.. ChicagoPizzaIngredientFactory
class Pizza {
+prepare()
/// other methods()
}
class Dough
<<interface>> Dough
class ThickCrustDough
class ThinCrustDough
Dough <|.. ThickCrustDough
Dough <|.. ThinCrustDough
class Sauce
<<interface>> Sauce
class PlumTomatoSauce
class MarinaraSauce
Sauce <|.. PlumTomatoSauce
Sauce <|.. MarinaraSauce
class Cheese
<<interface>> Cheese
class MozzarellaCheese
class ReggianoCheese
Cheese <|.. MozzarellaCheese
Cheese <|.. ReggianoCheese
class Clams
<<interface>> Clams
class FrozenClams
class FreshClams
Clams <|.. FrozenClams
Clams <|.. FreshClams
ThickCrustDough <|-- ChicagoPizzaIngredientFactory
PlumTomatoSauce <|-- ChicagoPizzaIngredientFactory
MozzarellaCheese <|-- ChicagoPizzaIngredientFactory
FrozenClams <|-- ChicagoPizzaIngredientFactory
ThinCrustDough <|-- NYPizzaIngredientFactory
MarinaraSauce <|-- NYPizzaIngredientFactory
ReggianoCheese <|-- NYPizzaIngredientFactory
FreshClams <|-- NYPizzaIngredientFactory
Pizza --> PizzaIngredientFactory
Pizza --> Dough
Pizza --> Sauce
Pizza --> Cheese
Pizza --> Clams
```
没有合适的资源?快使用搜索试试~ 我知道了~
实现各种面向对象设计模式的C + +项目集合-Object-C
共216个文件
hpp:81个
cpp:69个
md:25个
需积分: 2 0 下载量 92 浏览量
2024-04-24
22:39:42
上传
评论
收藏 1.36MB ZIP 举报
温馨提示
计算机技术是指评价计算机系统的各种知识和技能的总称。它涵盖了计算机硬件、软件、网络和信息安全等方面。计算机技术的发展使我们能够进行高效的数据处理、信息存储和传输。现代计算机技术包括操作系统、数据库管理、编程语言、算法设计等。同时,人工智能、云计算和大数据等新兴技术也在不断推动计算机技术的进步。计算机技术的应用广泛,涵盖了各个领域,如商业、医疗、教育和娱乐等。随着计算机技术的不断革新,我们可以更加高效地实现预期自动化、标准化
资源推荐
资源详情
资源评论
收起资源包目录
实现各种面向对象设计模式的C + +项目集合-Object-C (216个子文件)
GumballMachine.cpp 2KB
ChocolateBoiler.cpp 1KB
main.cpp 1KB
WeatherStation.cpp 1KB
WinnerState.cpp 1KB
main.cpp 1KB
Menu.cpp 990B
main.cpp 944B
HasCoinState.cpp 912B
Pizza.cpp 894B
Remote.cpp 865B
main.cpp 817B
Waitress.cpp 804B
GenericDisplay.cpp 798B
SoldState.cpp 796B
MenuItem.cpp 767B
main.cpp 739B
MenuItem.cpp 672B
main.cpp 656B
main.cpp 634B
SoldOutState.cpp 610B
NoCoinState.cpp 603B
ChicagoPizzaStore.cpp 582B
NYPizzaStore.cpp 555B
main.cpp 549B
DinerMenuIterator.cpp 511B
DinerMenu.cpp 498B
PancakeHouseMenuIterator.cpp 490B
PizzaStore.cpp 488B
LivingRoomTV.cpp 447B
ChicagoPizzaIngredientFactory.cpp 425B
Duck.cpp 415B
NYPizzaIngredientFactory.cpp 400B
ClamsPizza.cpp 366B
main.cpp 327B
CheesePizza.cpp 320B
main.cpp 319B
main.cpp 290B
Milk.cpp 267B
Mocha.cpp 255B
TurkeyObjectAdapter.cpp 252B
Whip.cpp 249B
PancakeHouseMenu.cpp 245B
Soy.cpp 243B
Coffee.cpp 234B
MallardDuck.cpp 232B
WildTurkey.cpp 211B
Light.cpp 206B
Tea.cpp 196B
Beverage.cpp 156B
Espresso.cpp 143B
HouseBlend.cpp 136B
DarkRoast.cpp 131B
MarinaraTomatoSauce.cpp 126B
MozzarellaCheese.cpp 115B
PlumTomatoSauce.cpp 114B
ThickCrustDough.cpp 113B
ThinCrustDough.cpp 110B
Decaf.cpp 110B
ReggianoCheese.cpp 109B
MallardDuck.cpp 101B
FrozenClams.cpp 100B
RubberDuck.cpp 100B
FlyWithWings.cpp 99B
FreshClams.cpp 97B
Squeak.cpp 86B
FlyNoWay.cpp 84B
MuteQuack.cpp 83B
Quack.cpp 82B
design-patterns-title.gif 756KB
.gitignore 14B
ChocolateBoiler.h 690B
Remote.hpp 1KB
PizzaIngredientFactory.hpp 1KB
MenuComponent.hpp 1003B
GumballMachine.hpp 833B
Duck.hpp 816B
WeatherStation.hpp 815B
CaffeineBeverage.hpp 796B
Subject.hpp 554B
Pizza.hpp 547B
MenuItem.hpp 540B
Menu.hpp 473B
ChicagoPizzaIngredientFactory.hpp 460B
NYPizzaIngredientFactory.hpp 450B
MenuItem.hpp 431B
GenericDisplay.hpp 424B
PancakeHouseMenu.hpp 421B
DinerMenu.hpp 398B
PancakeHouseMenuIterator.hpp 390B
Waitress.hpp 374B
Beverage.hpp 358B
LivingRoomTVOffCommand.hpp 353B
LivingRoomTVOnCommand.hpp 350B
LightOffCommand.hpp 341B
LightOnCommand.hpp 338B
DinerMenuIterator.hpp 323B
HasCoinState.hpp 294B
SoldOutState.hpp 294B
NoCoinState.hpp 292B
共 216 条
- 1
- 2
- 3
资源评论
若明天不见
- 粉丝: 1w+
- 资源: 272
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于OVMS v3的无线控制台系统(WifiConsole).zip
- (源码)基于Arduino和ESP32的IoT计算机开关系统.zip
- (源码)基于Qt框架的PX4飞行控制器固件升级系统.zip
- (源码)基于Spring Boot和Vue的需求管理系统.zip
- 基于深度学习YOLOv5的车牌检测与识别项目源码
- (源码)基于Python的CSGO饰品价格分析与比较系统.zip
- ccs3.3安装补丁SR12-CCS-v3.3-SR-3.3.82.13 2
- (源码)基于Spring Boot框架的攀枝花物流系统.zip
- (源码)基于Spring Boot和Vue的权限管理系统.zip
- (源码)基于Python和HMM的酵母起始密码子预测系统.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功