Introduction to OOAD and the UML.ppt

上传人:赵齐羽 文档编号:376694 上传时间:2018-10-08 格式:PPT 页数:83 大小:2.71MB
下载 相关 举报
Introduction to OOAD and the UML.ppt_第1页
第1页 / 共83页
Introduction to OOAD and the UML.ppt_第2页
第2页 / 共83页
Introduction to OOAD and the UML.ppt_第3页
第3页 / 共83页
Introduction to OOAD and the UML.ppt_第4页
第4页 / 共83页
Introduction to OOAD and the UML.ppt_第5页
第5页 / 共83页
亲,该文档总共83页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、Introduction to OOAD and the UML,Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU,OUTLINE,The development processReviewing Object Oriented Analysis and DesignVisual modeling and the Unified Modeling Language UML,OUTLINE,The development process Phases of system

2、development The Unified Process Object Oriented Analysis and DesignVisual Modeling and the Unified Modeling Language UML,The Development Process,Requirements: Develop the Requirements Model,Analysis: Develop the Logical Model,Design: Develop the Architecture Model,Implementation,Testing,Phases of Sy

3、stem Development,Requirements Engineering,Engineering Design,The IEEE 12207 Development Process,7,The Unified Process (The Rational Unified Process (RUP), adopted by IBM for system development),Supports System Development Using the Unified Model Language (UML) Evolutionary process where the system i

4、s built iteratively and incrementally in several builds starting from the requirements phase Architecture-centric,The Unified Process,Inception: Define the scope of the system (identify all external entities with which the system will interact and define the nature of the interactions)Elaboration: S

5、pecify features and develop the architectureConstruction: Build the systemTransition: Transition Product to its users,The Unified Process,The Unified Process,The UP develops the architecture iteratively in successive Refinements during the Elaboration phase,OUTLINE,The development process Reviewing

6、Object Oriented Analysis and Design Object-Oriented Analysis OOA Object-Oriented Design OODVisual Modeling and the Unified Modeling Language UML,Object Oriented Analysis and Design (OOAD),Review of OOAD Basic Concepts,Develops a system model using a set of interacting objects A Class: A class is a d

7、escription used to instantiate objects An Object: Is an instance of a class, it has a name, attributes and their values, and methods An object models an idea found in reality, (tangible or abstract),Basic Concepts (contd),Attributes of a class Methods of a class (Services, Actions, Messages) Informa

8、tion hiding and Encapsulation: A technique in which an object reveals as little as possible about its inner workings (Private and Public methods or attributes). Inheritance defines a class hierarchy based on abstraction,OUTLINE,The development process Reviewing Object Oriented Analysis and Design Ob

9、ject-Oriented Analysis OOA Object-Oriented Design OODVisual Modeling and the Unified Modeling Language UML,Object Oriented Analysis OOA,OOA Develops a Logical Model of the system as a set of interacting domain objectsThe model consists of two viewsThe static view: defines the classes and their depen

10、denciesThe dynamic view: models the scenarios of interactions between objects,Class A,Class B,Requires Service From Class B,Example: The Static Analysis Model Class diagram,The dynamicModel: A Scenario Of Interactions,OOA (cont.),OOA (cont.),OOA starts by identifying domain objects from the requirem

11、ents model (Use-Case Models) 1. Discovering Objects The Data Perspective In the problem space or external systems Physical devices (sensors, actuators) Events that need to be recorded (ex. Measurements) Physical or geographical locations,OOA (contd),The Functional Perspective What responsibilities d

12、oes the object have? Ex. An event handler, a controller, monitors, sensors, etc. The Behavioral Perspective Who does the object interact with? How? Use a State Transition Diagrams to describe the object behavior,OOA (contd): Identifying Domain Objects from the requirements model,In the statements of

13、 the requirements: An object may appear as a noun (ex. Measurement) or disguised in a verb (to measure) A method might appear as a verb (ex. Investigate) or disguised in a noun (investigation) Attributes describe some kind of characteristics for the object (adjectives). Attributes can be simple or c

14、omplex. Complex attributes may lead to forming new objects. Attributes can also be nouns.,OOA (contd): Object Types,External Entities and their interfaces: Sensors, actuators, control panel, devices, operators, pilots Information Items : Displays, Commands, Requests, etc. Entities which establishes

15、the context of the problem : Controller, monitors, schedulers,OOA (contd),2. Define Class Hierarchies GeneralizationDisplay Login Display Specialization ( IS_A)Temperature_Sensor - Sensor,Sensor,Brake Sensor,Engine Sensor,OOA (contd),3. Class Relationships Types Association General form of dependenc

16、y Aggregation An object may consist of other objectsInheritance Cardinality ( Multiplicity) ( Binary, Many, ),OOA (contd),Example of identifying Class diagrams with Relationships, Multiplicities, Attributes, and operations (E-Commerce),OOA (contd),4. Object Attributes Discovering attributes of class

17、es Attribute types Naming : Ex. SensorID, Account Descriptive Ex. Card expiration date Referential Ex. Referring to other objects,OOA (contd),5. The Dynamic View: Object Behavior Discovering states, transitions between states, and conditions and actions Building the state diagrams of objects,OOA (co

18、ntd),6. Object Services Implicit Services ( create, modify, search, delete , etc. ) ex. constructors Services associated with messages Services associated with object relationships Services associated with attributes (accessor methods ex. get, set . ),OUTLINE,The development process Reviewing Object

19、 Oriented Analysis and Design Object-Oriented Analysis OOA Object-Oriented Design OODVisual Modeling and the Unified Modeling Language UML,Object Oriented Design OOD,1. Architecture Design The static view: structural description (defining the components and subsystems) The Dynamic view (defining the

20、 interactions between components and subsystems ) 2. Detailed Design: Define detailed Class and object description Visibility (Private, protected, ) Containment (ex. Packages or Components) Concurrency,OOD: Architecture Design,Define the subsystems/components and their dependenciesInteractions betwe

21、en components are defined in design sequence diagrams,OOD: Detailed Design,Define the detailed design of each subsystem/component,OOD: The Dynamic View,Define design sequence diagrams for scenarios defined in the requirements model,3. Design Refinement: Enhance Design Goodness Criteria (e.g., using

22、design patterns) Coupling: The manner and degree of interdependence between classes (objects) Cohesion: The degree and manner to which the services or tasks performed by a component or an object are related to each other. Modularity Understandability Decomposability Clarity Simple classes, messages,

23、 methods,OOD (Contd),Summary of the Object-Oriented Analysis and Design (OOA) Methodology,Based on describing the logical model of the system and the environment as a set of interacting objects Defines the external objects (actors) interacting with the system as well as the internal objects that the

24、 system must contain Defines the static architecture of objects and the dynamic behavioral interactions between them Defines the internal dynamic behavior of objects,OUTLINE,The development processReviewing Object Oriented Analysis and DesignIntroducing visual modeling and the Unified Modeling Langu

25、age UML,Visual Modeling and the Unified Modeling Language UML,What is the UML? UML Concepts UML Development - Overview,The Unified Modeling Language UML,What is the UML? UML stands for Unified Modeling Language The UML is the standard language for visualizing, specifying, constructing, and documenti

26、ng the artifacts of a software-intensive systemIt can be used with all processes, throughout the development life cycle, and across different implementation technologies.,UML Concepts,The UML may be used to: Develop a Requirements Model Use Case diagrams - Define the scope, and display the boundary

27、of a system & its major functions using use cases and actors System Sequence diagrams - Illustrate use case realizations or scenarios of interactions between the actors and the system Develop the Analysis model Class diagrams - Represent a static structure of a system State Charts - Model the behavi

28、or of objects,UML Concepts,Develop the architecture design model Class diagrams: Represent the static architecture using packages or subsystems Design Sequence diagrams Represent the dynamic interactions between the design objects Develop the physical architecture implementation model component & de

29、ployment diagrams - Reveal the physical implementation architecture,Visual Modeling and the Unified Modeling Language UML,What is the UML? UML Concepts UML Development - Overview,UML Development - Overview,PROGRAM,ANALYSIS Specify Domain Objects,Detailed DESIGN,IMPLEMENTATION,D,A,T,A,D,I,C,T,I,O,N,A

30、,R,Y,Time,ANALYSIS CLASS DIAGRAM(S),IMPLEMENTATION Activity DIAGRAMS,System/Object SEQUENCE DIAGRAMS,OPERATION CONTRACTS,StateChart DIAGRAMs,DEPLOYMENT DIAGRAM,SUBSYSTEM CLASS/ OR COMPONENT DIAGRAMS,Architectural Design Include Design Objects,Object Design,REQUIREMENTS ELICITATION,DESIGN DIAGRAMS,IM

31、PLEMENTATION CHOICES,DESIGN SEQUENCE DIAG.,Requirements Engineering,A Model of embedded systems development,Visual Modeling and the Unified Modeling Language UML,What is the UML? UML Concepts UML Development Overview Requirements Engineering Requirements Elicitation,UML Development - Overview,PROGRA

32、M,ANALYSIS Specify Domain Objects,Detailed DESIGN,IMPLEMENTATION,D,A,T,A,D,I,C,T,I,O,N,A,R,Y,Time,ANALYSIS CLASS DIAGRAM(S),IMPLEMENTATION Activity DIAGRAMS,System/Object SEQUENCE DIAGRAMS,OPERATION CONTRACTS,StateChart DIAGRAMs,DEPLOYMENT DIAGRAM,SUBSYSTEM CLASS/ OR COMPONENT DIAGRAMS,Architectural

33、 Design Include Design Objects,Object Design,REQUIREMENTS ELICITATION,DESIGN DIAGRAMS,IMPLEMENTATION CHOICES,DESIGN SEQUENCE DIAG.,Requirements Engineering,UML Use Case Diagrams: The Requirements Model Defining Actors (External objects),An actor is an object that must interact with the system under

34、development,UML Use Case Diagrams: The Requirements Model,Defining Use Cases A use case captures the user requirements, it is a pattern of behavior the system exhibits Each use case is a sequence of related interactions performed by an actor and the system in a dialogue Actors are examined to determ

35、ine their needs Each actor must have association with at least one use case Use cases can be related to each other,UML Use Case Diagrams: The Requirements Model,Case Study,UML Use Case Diagrams: The Requirements Model,Documenting Use Cases A flow of events document is created for each use cases Writ

36、ten from an actor point of view Details what the system must provide to the actor when the use cases is executed Typical contents How the use case starts and ends Normal flow of events Alternate flow of events Exceptional flow of events,UML Use Case Diagrams: The Requirements Model,Use Case Realizat

37、ions: Object Interaction diagrams The use case diagram presents an outside view of the system Interaction diagrams capture the scenarios of the functional requirements They describe how use cases are realized as interactions among societies of objects (objects interact to accomplish a function of th

38、e system) UML supports two types of interaction diagrams: Sequence diagrams, and Collaboration diagrams,UML Use Case Diagrams: The Requirements Model Digital Sound Recorder Case Study,A sequence diagram displays object interactions arranged in a time sequence capturing a specific scenario of interac

39、tions in a use case supported by the system,Time,Visual Modeling and the Unified Modeling Language UML,What is the UML? UML Concepts UML Development Overview Requirements Engineering Requirements Elicitation The Analysis Model,UML Development - Overview,PROGRAM,ANALYSIS Specify Domain Objects,Detail

40、ed DESIGN,IMPLEMENTATION,D,A,T,A,D,I,C,T,I,O,N,A,R,Y,Time,ANALYSIS CLASS DIAGRAM(S),IMPLEMENTATION Activity DIAGRAMS,System/Object SEQUENCE DIAGRAMS,OPERATION CONTRACTS,StateChart DIAGRAMs,DEPLOYMENT DIAGRAM,SUBSYSTEM CLASS/ OR COMPONENT DIAGRAMS,Architectural Design Include Design Objects,Object De

41、sign,REQUIREMENTS ELICITATION,DESIGN DIAGRAMS,IMPLEMENTATION CHOICES,DESIGN SEQUENCE DIAG.,Requirements Engineering,UML Class Diagrams: The Analysis Model,A class diagram shows the existence of classes and their relationships in the logical view of a system UML modeling elements in class diagrams Cl

42、asses and their structure and behavior Association, aggregation, and inheritance relationships Multiplicity and navigation indicators Role names,UML Class Diagrams: The Analysis Model,Define Classes, Relationships, Multiplicities, Attributes, and operations,UML Class Diagrams: The Analysis Model Dig

43、ital Sound Recorder Case Study,UML State charts: The Analysis Model,The State of an Object A state transition diagram shows The life history of a given class The events that cause a transition from one state to another The actions that result from a state change State transition diagrams are created

44、 for objects with significant dynamic behavior,UML State charts: The Analysis Model,UML State charts: The Analysis Model Digital Sound Recorder Case Study,Visual Modeling and the Unified Modeling Language UML,What is the UML? UML Concepts UML Development Overview Requirements Engineering Requirement

45、s Elicitation The Analysis Model The Design Model,UML Development - Overview,PROGRAM,ANALYSIS Specify Domain Objects,Detailed DESIGN,IMPLEMENTATION,D,A,T,A,D,I,C,T,I,O,N,A,R,Y,Time,ANALYSIS CLASS DIAGRAM(S),IMPLEMENTATION Activity DIAGRAMS,System/Object SEQUENCE DIAGRAMS,OPERATION CONTRACTS,StateCha

46、rt DIAGRAMs,DEPLOYMENT DIAGRAM,SUBSYSTEMS / CLASS/ OR COMPONENT DIAGRAMS,Architectural Design Include Design Objects,Object Design,REQUIREMENTS ELICITATION,DESIGN DIAGRAMS,IMPLEMENTATION CHOICES,DESIGN SEQUENCE /or COLLABORATION DIAGRAMS.,Requirements Engineering,Object Oriented Design OOD,1. Archit

47、ecture Design (Subsystem/Component Diagrams) The static view: structural description (defining the components and subsystems) The Dynamic view (defining the interactions between components and subsystems ) 2. Detailed Design: Define detailed Class and object description Visibility (Private, protecte

48、d, ) Containment (ex. Packages or Components) Concurrency,UML Class Diagrams: Architecture Design: The static view Digital Sound Recorder Case Study,Define the subsystems/components and their dependenciesInteractions between components are defined in design sequence diagrams,UML Class Diagrams: Deta

49、iled Design: The static view Digital Sound Recorder Case Study,Define the detailed design of each subsystem/component,Example: The Static Analysis Model Class diagram,The dynamicModel: A Scenario Of Interactions,Recall: OOA (cont.) Satellite Control Example,UML Class Diagrams: Detailed Design: The static view Composite Structure Diagrams (UML2) Satellite Control Example,UML Development Overview Detailed Design: The dynamic view, Design Sequence Diagrams,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 教学课件 > 大学教育

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1