Introduction to UML.ppt
《Introduction to UML.ppt》由会员分享,可在线阅读,更多相关《Introduction to UML.ppt(38页珍藏版)》请在麦多课文档分享上搜索。
1、Introduction to UML,Majid Ali KhanSpring 2005,Acknowledgements,Slides material are taken from different sources including: Prashanth Aedunuthula UML presentation, Fall 2004 Lecture slides from Software Engineering course at UC Berkeley (Professor Necula Fall 2004) Lecture slides from a course on web
2、 at: www.sts.tu-harburg.de/ teaching/ws-98.99/OOA+D/3-0-UML.pdf,Overview,What is Modeling? What is UML? A brief history of UML Understanding the basics of UML UML diagrams UML Modeling tools,Modeling,Describing a system at a high level of abstraction A model of the system Used for requirements and s
3、pecificationsIs it necessary to model software systems?,Object Oriented Modeling,What is UML?,UML stands for “Unified Modeling Language”It is a industry-standard graphical language for specifying, visualizing, constructing, and documenting the artifacts of software systemsThe UML uses mostly graphic
4、al notations to express the OO analysis and design of software projects. Simplifies the complex process of software design,Why UML for Modeling,Use graphical notation to communicate more clearly than natural language (imprecise) and code(too detailed).Help acquire an overall view of a system.UML is
5、not dependent on any one language or technology.UML moves us from fragmentation to standardization.,History of UML,Types of UML Diagrams,Use Case DiagramClass DiagramSequence DiagramCollaboration DiagramState DiagramThis is only a subset of diagrams but are most widely used,Use Case Diagram,Used for
6、 describing a set of user scenarios Mainly used for capturing user requirements Work like a contract between end user and software developers,Use Case Diagram (core components)Actors: A role that a user plays with respect to the system,including human users and other systems. e.g.,inanimate physical
7、 objects (e.g. robot); an external system that needs some information from the current system. Use case: A set of scenarios that describing an interaction between a user and a system, including alternatives.,System boundary: rectangle diagram representing the boundary between the actors and the syst
8、em.,Use Case Diagram(core relationship),Association: communication between an actor and a use case; Represented by a solid line. Generalization: relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow hea
9、d toward the parent use case.,Use Case Diagram(core relationship),Extend: a dotted line labeled with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares “extension points”.,Include: a dotted line labeled beginning at base use case and
10、ending with an arrows pointing to the include use case. The include relationship occurs when a chunk of behavior is similar across more than one use case. Use “include” in stead of copying the description of that behavior. ,Use Case Diagrams,Library System,Borrow,Order Title,Fine Remittance,Client,E
11、mployee,Supervisor,A generalized description of how a system will be used. Provides an overview of the intended functionality of the system,Boundary,Actor,Use Case,Use Case Diagrams(cont.),(TogetherSoft, Inc),Use Case Diagrams(cont.),Pay Bill is a parent use case and Bill Insurance is the child use
12、case. (generalization)Both Make Appointment and Request Medication include Check Patient Record as a subtask.(include) The extension point is written inside the base case Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend),Class diagram,Used for describing
13、 structure and behavior in the use cases Provide a conceptual model of the system in terms of entities and their relationships Used for requirement capture, end-user interaction Detailed class diagrams are used for developers,Class representation,Each class is represented by a rectangle subdivided i
14、nto three compartments Name Attributes Operations Modifiers are used to indicate visibility of attributes and operations. + is used to denote Public visibility (everyone) # is used to denote Protected visibility (friends and derived) - is used to denote Private visibility (no one) By default, attrib
15、utes are hidden and operations are visible.,An example of Class,OO Relationships,There are two kinds of Relationships Generalization (parent-child relationship) Association (student enrolls in course) Associations can be further classified as Aggregation Composition,Subtype2,Supertype,Subtype1,OO Re
16、lationships: Generalization,- Generalization expresses a parent/child relationship among related classes. - Used for abstracting details in several layers,Regular Customer,LoyaltyCustomer,Customer,Example:,Regular Customer,LoyaltyCustomer,Customer,or:,Represent relationship between instances of clas
17、ses Student enrolls in a course Courses have students Courses have exams Etc. Association has two ends Role names (e.g. enrolls) Multiplicity (e.g. One course can have many students) Navigability (unidirectional, bidirectional),OO Relationships: Association,Association: Multiplicity and Roles,Univer
18、sity,Person,1,01,*,*,Multiplicity Symbol Meaning 1 One and only one 01 Zero or one MN From M to N (natural language) * From zero to any positive integer 0* From zero to any positive integer 1* From one to any positive integer,teacher,employer,Role,Role “A given university groups many people; some ac
19、t as students, others as teachers. A given student belongs to a single university; a given teacher may or may not be working for the university at a particular time.”,student,Class Diagram,Order,-dateReceived,-isPrepaid,-number :String,-price : Money,+dispatch(),+close(),Customer,-name,-address,+cre
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- INTRODUCTIONTOUMLPPT
