复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 16 - UML类图

Chapter 16 UML类图 ●●●●● ●●●● ●●。●●
Chapter 16 UML类图

●●●●● ●●●● 简介 ●●● ●●● ●●●● ●UML用类图表示类,接口及其关联 类图用于静态对象建模 类图和概念图之间的关系 Domain model Register 1 Captures conceptual perspective is Complete: Boolean /total Register Sale Design Model time is Complete: Boolean DCD: software end saleo currentSale/total perspective enterItem(.) make Payment(.) makeLineltem()
简介 ⚫ UML用类图表示类,接口及其关联 ⚫ 类图用于静态对象建模 ⚫ 类图和概念图之间的关系 Register ... endSale() enterItem(...) makePayment(...) Sale time isComplete : Boolean /total makeLineItem(...) Register ... Sale time isComplete : Boolean /total Captures 1 1 1 Domain Model conceptual perspective Design Model DCD; software perspective currentSale

表示法(文本格式) SuperclassFoo used to distinguish the package name from the class name ●●●●● SuperclassFoo( abstract ●●●● unofficially, the second alternative class OrStaticAttribute: Int Is common ●●● ●●● 3 common compartments privateAttribute ●●●● ssumed Private Attribute 1. classifier name Initialized Attribute: Bool true aCollection: VeggieBurger[ o java. awt: Font 2. attributes attribute Legally BeNull String [0.11 finalConstantAttribute: Int=5(readonly 1 java. awt. Font /derivedAttribute 3. operations plain: Int =0 readonly classorStaticMethodo bold: Int =1 readOnly y publicMethodo assumedPublicMethodo style: Int =0 an interface protectedMethodo keyword getFont(name: String): Font packageVisibleMethod getName0: String methodWithParms(parm1: String parma: Float methodReturns Something(: Veggie Burger Interface》 methodThrows Exception( exception IOException Runnable abstractMethodo abstractMethod20 abstract) //alternate runo finalMethodo( leaf)//no override in subclass ynchronizedMethodoi guarded y interface subclassing Subclass Foo Purchaseorder association with ellipsis".means there may be elements, but not shown multiplicities blank compartment officially means "unknown but as a convention will be used to mean "no members
表示法(文本格式) java.awt::Font or java.awt.Font plain : Int = 0 { readOnly } bold : Int = 1 { readOnly } name : String style : Int = 0 ... getFont(name : String) : Font getName() : String ... «interface» Runnable run() - ellipsis “…” means there may be elements, but not shown - a blank compartment officially means “unknown” but as a convention will be used to mean “no members” SubclassFoo ... run() ... SuperclassFoo or SuperClassFoo { abstract } - classOrStaticAttribute : Int + publicAttribute : String - privateAttribute assumedPrivateAttribute isInitializedAttribute : Bool = true aCollection : VeggieBurger [ * ] attributeMayLegallyBeNull : String [0..1] finalConstantAttribute : Int = 5 { readOnly } /derivedAttribute + classOrStaticMethod() + publicMethod() assumedPublicMethod() - privateMethod() # protectedMethod() ~ packageVisibleMethod() «constructor»SuperclassFoo( Long ) methodWithParms(parm1 : String, parm2 : Float) methodReturnsSomething() : VeggieBurger methodThrowsException() {exception IOException} abstractMethod() abstractMethod2() { abstract } // alternate finalMethod() { leaf } // no override in subclass synchronizedMethod() { guarded } 3 common compartments 1. classifier name 2. attributes 3. operations interface implementation and subclassing Fruit ... ... PurchaseOrder ... ... 1 association with multiplicities dependency officially in UML, the top format is used to distinguish the package name from the class name unofficially, the second alternative is common order an interface shown with a keyword

图形格式 ●●●●● ●●●● ●●● (Rational Software Modeler) ●●● ●●●● AC卫ass 口 privateAttribute o publicAttribute 工 nteger o staticattribute ● lOAn10 peration St112 o abstractOperation (
图形格式 (Rational Software Modeler)

●●●●● ●●●● UML中的类型 ●●● ●●● ●●●● 类 接 ●枚举 ●数据类型 inter face》 enuunerat1on》 Person Iterator 运年级 o name: String o一年级 e haslEt ( o二年级 o三年级 (primitive) 9 Date
UML中的类型 ⚫ 类 ⚫ 接口 ⚫ 枚举 ⚫ 数据类型

●●●●● ●●●● 属性表示:文本和关联线 ●●● ●●● ●●●● 对数据类型对象使用属性文本,对引用对象使用关联线 Register Sale applying the guideline to show attributes as id: Int time: date time attribute text versus as currentsale association lines Register has THREE attributes Store 1. id 2. currentSale address: Address 3. location location phone: PhoneNumber
属性表示:文本和关联线 Register id: Int ... Sale time: DateTime ... 1 applying the guideline to show attributes as attribute text versus as association lines Store address: Address phone: PhoneNumber ... 1 Register has THREE attributes: 1. id 2. currentSale 3. location currentSale location 对数据类型对象使用属性文本,对引用对象使用关联线

●●●●● ●●●● 属性表示:混合文本和关联线 ●●● ●●● ●●●● using the attribute Register text notation to indicate Register has o currentSale: Sale a reference to one Sale instance OBSERVE: this style Register Sale visually emphasizes the connection between these classes o currentSale using the association notation to indicate Register has a reference to one Sale instance thorough and Register unambiguous, but some currentsale: Sale people dislike the possible redundancy currentsale
属性表示:混合文本和关联线 Register ... ... Sale ... ... 1 Register currentSale : Sale ... Sale ... ... using the attribute text notation to indicate Register has a reference to one Sale instance using the association notation to indicate Register has a reference to one Sale instance OBSERVE: this style visually emphasizes the connection between these classes currentSale Register currentSale : Sale ... Sale ... ... 1 thorough and unambiguous, but some people dislike the possible redundancy currentSale

●●●●● ●●●● 属性表示:导航箭头 ●●● ●●● ●●●● thorough and Register Sale unambiguous, but some current sale: Sale people dislike the possible redundancy currentsale Company Person
属性表示:导航箭头 Register currentSale : Sale ... Sale ... ... 1 thorough and unambiguous, but some people dislike the possible redundancy currentSale Company Person 1 *

●●●●● ●●●● 属性表示:多重性 ●●● ●●● ●●●● zero or more many one or more 1.40 one to 40 5 exactly 5 3,5,8 exactly 3, 5, or 8
属性表示:多重性 zero or more; "many" one or more one to 40 exactly 5 T T T T * 1..* 1..40 5 T 3, 5, 8 exactly 3, 5, or 8

●●●●● ●●●● 属性表示:角色名 ●●● ●●● ●●●● Employer Company Person Employee
属性表示:角色名 Company Person Employer Employee
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 15 - UML交互图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 14 - 迈向对象设计.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 13 - 逻辑架构和UML包图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 11 - 操作契约.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 10 - 系统顺序图.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 9 - 领域模型.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 8 - 细化阶段的迭代——基础.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 7 - 其他需求.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 6 - 用例.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 4 Chapter 5 - 初始阶段的需求.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 3 - 案例分析 THE NEXTGEN POS SYSTEM.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_OOP:Object-Oriented Programming.pptx
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 2 - 迭代、进化和敏捷.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 1 - 面向对象分析和设计.ppt
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_9-11 UC Design、Subsystem Design、Class Design.pdf
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_6-8 Identify Design Elements、RunTime Architecture、Describe Distribution.pdf
- 复旦大学:《面向对象分析和设计》课程资料_课程注册系统_1-5 最佳实践、需求、分析设计、架构分析、用例分析.pdf
- 复旦大学:《面向对象分析和设计》课程资料_Exception handling refactorings.pdf
- 复旦大学:《面向对象分析和设计》课程资料_Error Handling.pdf
- 复旦大学:《面向对象分析和设计》课程资料_AntiPattern_2.Servlet.pdf
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 17 - GRASP基于职责设计对象.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 18 - 使用GRASP的对象设计示例.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 19 Chapter 20 Chapter 22.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Chapter 21 测试驱动的开发与重构.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_复习:OOAD部分.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_AOP Aspect Oriented Programming.pptx
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Hibernate Persistence.ppt
- 复旦大学:《面向对象分析和设计》课程资料_UML和模式_Hibernate 演示场景.pptx
- 复旦大学:《电子商务》课程资源_教学大纲.pdf
- 复旦大学:《电子商务》课程资源_教学案例:The Business Model-Recent Developments and Future Research-JOM2011.pdf
- 复旦大学:《电子商务》课程资源_教学研究:Online Game Addiction among Adolescents_Motivation and Prevention Factors.pdf
- 复旦大学:《电子商务》课程资源_教学研究:Research On The Utility Of An Advanced ACA In Context-Aware Tour Planning System.pdf
- 复旦大学:《电子商务》课程PPT课件_第二次课 电子商务的商业模式与分类.ppt
- 复旦大学:《电子商务》课程PPT课件_第一次课 引言(胥正川).ppt
- 复旦大学:《电子商务》课程PPT课件_第三次课 电子商务过程及相关因素(电子商务创业).ppt
- 复旦大学:《电子商务》课程PPT课件_第四次课 电子商务商业计划书写作 Creating a Winning E-Business Second Edition.ppt
- 复旦大学:《电子商务》课程PPT课件_第七次课 B2C电子商务——网上零售.pptx
- 复旦大学:《电子商务》课程PPT课件_第九次课 B2B电子商务(B2B行业平台).ppt
- 复旦大学:《电子商务》课程PPT课件_第五次课 商业模式的概念与内涵(发现商业模式).ppt
- 复旦大学:《电子商务》课程PPT课件_第八次课 电子商务模式与应用课程主题案例分析与展示——电子商务团购.ppt