object.md - cccnqu/se106a GitHub Wiki
物件導向
Function-Oriented => Data-Oriented
Object-Oriented
- 封裝: Data Encapsulation
- 繼承: Inheritance
- 多型: Polymorphism
Object-Oriented Analysis
- 寫下《使用案例》描述 (Use Case)
- 尋找其中的
- 名詞 nouns => 物件 classes
- 形容詞 adjectives => 屬性 attributes
- 動詞 verbs => 函數 operations
範例: User can add more than one item on sale at a time to a shopping cart * classes : user, item, shopping cart *
範例: 課程管理系統 Course management system 描述:https://www.udacity.com/wiki/ud175/class-diagram
- The Registration Manager set up the curriculum (課程) for a semaster using a schdeuling algorithm
- One course may have multiple course offerings
- Each course offering has a number, location and time
- Students select 4 primary courses and 2 alternative courses by submitting a registration form
- Students may use the system to add/drop courses for a period of time after registration
- Professors use the system to receive their course offering rosters (執勤表)
- User of the registration system are assigend passwords which are used at logon validation