# 面向对象设计

> 考核关键是如何设计class，class的properties和methods定义好，掌握class的继承

## 1. 面试过程

* clarification: 先理清`业务流程`
* 根据流程图，找到`core object`，明确`use case`
* 完善整体设计`class diagram`，写出`class`和`重点method`

## 2. 案例

* [停车场](https://longxingtan.gitbook.io/mle-interview/03_system/01_ood/parking_lot)
* [电梯](https://longxingtan.gitbook.io/mle-interview/03_system/01_ood/lift)
* [design Linux file search utility](https://longxingtan.gitbook.io/mle-interview/03_system/01_ood/unix_file)
* drink sale system
* amazon locker
* 酒店预订
* vending machine
* 中国象棋
* 操作系统内存管理分页分段的API

## 3. 参考

* Grokking the Object Oriented Design Interview
* <https://github.com/ycwkatie/OOD-Object-Oriented-Design>
* <https://github.com/rajat19/system-design>
* <http://www.cs.sjsu.edu/\\~pearce/modules/lectures/ooa2/ood/index.htm>
* <https://medium.com/javarevisited/top-10-object-oriented-analysis-and-design-interview-questions-and-problems-for-experienced-6c3a53b7cb26>
* <https://github.com/nikhilagrwl07/System-Design/tree/master/src/main/java>
* <https://github.com/ycwkatie/OOD-Object-Oriented-Design>
* <https://rajat19.github.io/system-design/category/system-designs.html>
* <https://leetcode.com/playground/ay5RFRWQ>
* [python手写一个event loop - Kittyhawk的文章 - 知乎](https://zhuanlan.zhihu.com/p/111656060)
* [高并发，用Python适合吗？ - 骑蜗牛上月球的回答 - 知乎](https://www.zhihu.com/question/383946811/answer/3297627184)
* [await,async 我要把它翻个底朝天，这回你总该明白了吧 - 一线码农的文章 - 知乎](https://zhuanlan.zhihu.com/p/197335532)
