当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

上海交通大学:《面向对象分析与设计 Object Oriented Analysis and Design》课程教学资源(PPT课件讲稿)15 Class Design

资源类别:文库,文档格式:PPT,文档页数:91,文件大小:1.69MB,团购合买
 Create Initial Design Classes  Define Operations  Define Methods  Define States  Define Attributes  Define Dependencies  Define Associations  Define Generalizations
点击下载完整版文档(PPT)

Shanghai Jiao Tong University 上海交通大学 Object Oriented Analysis and Design Class Design 上海交通大学软件工程中心

Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Class Design

Class Design in Context [Early Elaboration [Inception Iteration] Iteration (Optional)] Define a Candidate Perform Architecture Architectural L Synthesis Analyze Behavior (Optional) Refine the Architecture Class Design Designer Define Design the Components Database Object Oriented Analysis and Design 2

Object Oriented Analysis and Design 2 Class Design in Context [Early Elaboration Iteration] [Inception Iteration (Optional)] Define a Candidate Architecture Perform Architectural Synthesis Analyze Behavior Refine the Architecture Define Components Design the Database (Optional) Class Design Designer

Class Design Overview Project Specific Guidelines Class Design Design Classes Supplementary Specifications Object Oriented Analysis and Design 3

Object Oriented Analysis and Design 3 Class Design Overview Supplementary Specifications Class Design Project Specific Guidelines Design Classes

Outline Create Initial Design Classes ◆Define Operations ◆Define Methods ◆Define States ◆Define Attributes ◆Define Dependencies ◆Define Associations ◆ Define Generalizations Object Oriented Analysis and Design 4

Object Oriented Analysis and Design 4 Outline  Create Initial Design Classes  Define Operations  Define Methods  Define States  Define Attributes  Define Dependencies  Define Associations  Define Generalizations

Outline Create Initial Design Classes ◆Define Operations ◆Define Methods ◆Define States ◆Define Attributes ◆Define Dependencies ◆Define Associations Define Generalizations ◆ Object Oriented Analysis and Design 5

Object Oriented Analysis and Design 5 Outline  Create Initial Design Classes  Define Operations  Define Methods  Define States  Define Attributes  Define Dependencies  Define Associations  Define Generalizations

Class Design Considerations Class stereotype Boundary Entity Control Applicable design patterns Architectural mechanisms Persistence Distribution etc. Object Oriented Analysis and Design 6

Object Oriented Analysis and Design 6 Class Design Considerations  Class stereotype ▪ Boundary ▪ Entity ▪ Control  Applicable design patterns  Architectural mechanisms ▪ Persistence ▪ Distribution ▪ etc

How Many Classes Are Needed? Many,simple classes means that each class Encapsulates less of the overall system intelligence Is more reusable Is easier to implement A few,complex classes means that each class ■ Encapsulates a large portion of the overall system intelligence Is less likely to be reusable Is more difficult to implement A class should have a single well-focused purpose.A class should do one thing and do it well! Object Oriented Analysis and Design 7

Object Oriented Analysis and Design 7 A class should have a single well-focused purpose. A class should do one thing and do it well! How Many Classes Are Needed?  Many, simple classes means that each class ▪ Encapsulates less of the overall system intelligence ▪ Is more reusable ▪ Is easier to implement  A few, complex classes means that each class ▪ Encapsulates a large portion of the overall system intelligence ▪ Is less likely to be reusable ▪ Is more difficult to implement

Strategies for Designing Boundary Classes User interface (Ul)boundary classes ■ What user interface development tools will be used? How much of the interface can be created by the development tool? ◆ External system interface boundary classes Usually model as subsystem MainWindow SubWindow MainForm Button DropDownList Object Oriented Analysis and Design 8

Object Oriented Analysis and Design 8 Strategies for Designing Boundary Classes  User interface (UI) boundary classes ▪ What user interface development tools will be used? ▪ How much of the interface can be created by the development tool?  External system interface boundary classes ▪ Usually model as subsystem MainForm SubWindow Button DropDownList MainWindow

Strategies for Designing Entity Classes ◆ Entity objects are often passive and persistent Performance requirements may force some re-factoring ◆ See the Identify Persistent Classes step Analysis Design FatClass FatClass -privateAttr privateAttr -commonlyUsedAttr1 getCommonlyUsedAttr1() commonlyUsedAttr2 getCommonlyUsedAttr2() rarelyUsed1 getRarelyUsedAtt1() -rarelyUsed2 getRarelyUsedAtt2() 0.1 FatClassDataHelper FatClassLazy DataHelper commonlyUsedAttr1 -rarelyUsedAttr1 commonlyUsedAttr2 rarelyUsedAttr2 Object Oriented Analysis and Design 9

Object Oriented Analysis and Design 9 Strategies for Designing Entity Classes  Entity objects are often passive and persistent  Performance requirements may force some re-factoring  See the Identify Persistent Classes step Analysis FatClassLazyDataHelper - rarelyUsedAttr1 - rarelyUsedAttr2 Design FatClass - privateAttr + getCommonlyUsedAttr1() + getCommonlyUsedAttr2() + getRarelyUsedAtt1() + getRarelyUsedAtt2() FatClassDataHelper - commonlyUsedAttr1 - commonlyUsedAttr2 1 0..1 FatClass - privateAttr - commonlyUsedAttr1 - commonlyUsedAttr2 - rarelyUsed1 - rarelyUsed2 >

Strategies for Designing Control Classes What happens to Control Classes? Are they really needed? Should they be split? ◆How do you decide? Complexity Change probability ■ Distribution and performance Transaction management Object Oriented Analysis and Design 10

Object Oriented Analysis and Design 10 Strategies for Designing Control Classes  What happens to Control Classes? ▪ Are they really needed? ▪ Should they be split?  How do you decide? ▪ Complexity ▪ Change probability ▪ Distribution and performance ▪ Transaction management

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共91页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有