Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams.

Slides:



Advertisements
Similar presentations
Deliverable #8: Detailed Design - Overview due: Wednesday, 7 March All Deliverable materials are to be posted into Team Concert. Your to.
Advertisements

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Interaction Diagrams.
Use Case Model. C-S 5462 Use case model describes what the user expects the system to do –functional requirements may describe only the functionalities.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
©1998, 1999, 2000 Rational Software - All rights reserved Session VM08 Structuring Your Rational Rose Model Robert Bretall Rational Software.
CSCI 639 Topics in Software Engineering Assignment #5 Fall 2008.
1 SWE Introduction to Software Engineering Lecture 15 – System Modeling Using UML.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Interaction Diagrams.
CREATING THE DESIGN: THE LOGICAL VIEW The Class Diagram.
Rational Rose Basics Visual Modeling Textbook – Chapter 3
© Copyright Eliyahu Brutman Programming Techniques Course.
Detail Design: Use-Case Design
Rational Rose Overview Diagrams, Directory Structure, Working with Rose.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Introduction to Rational Rose 2000 Create Use Case Model Visual Modeling Text – Chapter 3 Original notes from Rational Software Corporation – 1998 Modified.
Use Case Analysis – continued
Object Oriented Analysis and Design Using the UML
Unified Modeling Language
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 6: Use-Case Analysis Module 6 - Use-Case Analysis.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
CS 8532: Adv. Software Eng. – Spring 2007 Dr. Hisham Haddad Tuesday Class will start momentarily. Please Stand By … CS 8532: Advanced Software.
The Design Discipline.
Page 1 What is the UML? UML stands for Unified Modeling Language The UML combines the best of the best from – Data Modeling concepts (Entity Relationship.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 11 Subsystem Design.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Solid Palette Gradient Palette I Gradient Palette II APPLYING THESE COLORS Click on the desired color Click on the paintbrush tool located.
Page 1  Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling captures essential parts of.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Building Analysis Classes.
Systems Analysis and Design in a Changing World, 3rd Edition
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Notes of Rational Related cyt. 2 Outline 3 Capturing business requirements using use cases Practical principles  Find the right boundaries for your.
Actors and Use Case Diagrams Month Day, Year. Agenda Training Plan Overview Review Detailing Requirements with Requisite Pro Concepts Setting Up XDE Integration.
Chapter 16 Applying UML and Patterns Craig Larman
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
1 IBM Software Group ® Mastering Object-Oriented Analysis and Design with UML 2.0 Module 6: Use-Case Analysis.
ANALYSIS - II REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Sequence Diagrams And Collaboration Diagrams HungNM.
Using COMET with Visio Visio UML Modeling. Creating a Drawing After opening Visio, you will see a list of templates available.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
Object Oriented Analysis and Design using the UML Use-Case Analysis Adapted by Dr. Spiegel from Slides Provided by Rational Software.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
310414IMPLEMENTATION1 IMPLEMENTATIONIMPLEMENTATION SOFTWARE ENGINEERING SOFTWARE ENGINEERING.
Use Case Model Use case description.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Project Deliverables CIS 4328 – Senior Project 2 And CEN Engineering of Software 2.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1 Use Case Analysis – Part 4 Analysis Mechanisms.
Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Introduction to Rational Rose 2000 Create Use Case Model.
UML Diagrams: Class Diagrams The Static Analysis Model
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Unified Modeling Language
The Object Oriented Approach to Design
Analysis models and design models
CS 8532: Advanced Software Engineering
Rational Rose 2000 Instructor Notes Use Case Realization Structure
Design Yaodong Bi.
CIS 375 Bruce R. Maxim UM-Dearborn
Use Case Analysis – continued
Presentation transcript:

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 1 Rational Rose 2000 Class Diagrams

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 2 Module Objectives  Define analysis classes. (already done)  Define view of participating classes (VOPC) class diagram.  Use Rational Rose to add a class and create a VOPC diagram.  Run a script auto generate VOPC diagram.  Run reports to show class instances and usage.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 3 Where Are We? The Analysis and Design Workflow Classes and class diagram are initially identified and created respectively during the elaboration phase of this workflow. Some classes may be identified as late as the construction phase for use cases that were not previously analyzed.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 4 Where Are We? – Use Case Analysis Classes and class diagrams are identified and refined during the activities outlined ahead. Use case analysis Identify classes that perform a use case’s flow of events. (analysis classes) Distribute use case behavior to those classes, using use case realizations. Identify the responsibilities, attributes, and associations of the classes. Input artifacts Glossary Use case model Supplementary specifications Use case realizations Use case modeling guidelines Software architecture document

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 5 Where are we? – We will be doing: - Use Case Design  Use case design Replace analysis classes with design subsystems and classes.  Refine requirements on the operations of subsystems and/or their interfaces.  Input artifacts Supplementary specifications Design subsystems Use cases Interfaces Use case realizations Design classes

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 6 Then: Subsystem Design Subsystem design Define realizations between the subsystem's interfaces and contained classes Document internal structure of the subsystem. Define realizations between the subsystem’s interfaces and contained classes Determine dependencies on other subsystems. Input artifacts Use case realizations Design subsystem with interface definitions Design guidelines

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 7 Then Class Design Class design Ensures that the class provides the behavior the use case realizations need Ensures that sufficient information is provided to unambiguously implement the class Handles non-functional requirements related to the class. Incorporates the design mechanisms used by the class. Ensures that the class provides the behavior the use case realizations need Input artifacts Supplementary specificationsUse cases Design Guidelines Use case realizations Design classesDesign model

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 8 Key Concepts  Analysis classes  Represent the prototypical classes of the system.  Stereotyped as boundary, control, and entity.  Boundary classes used to model interactions between a system’s surroundings and its inner workings. This class models parts of the system that depend on its surroundings, such as printer interfaces.  Control classes are used to model control behavior specific to one or a few use cases. Models parts of the system that are independent of the system’s surroundings.  Entity – used to model information and associated Behavior that must be stored. Entities represent the key concepts of the system. As we move to class design, analysis classes may be refined into design classes or drop out entirely.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 9 Key Concepts: Analysis vs Design Classes Analysis classes represent functional requirements of the problem domain. Design classes represent the non functional requirements of the solution domain. Again, we move from what the system should do to how the system will do it.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 10  Class diagram  VOPC (classes only shown here) Key Concepts Class Diagrams:. Show a set of classes, interfaces, and collaborations and relationships. Modeled to show static view (logical view) of system;. Primarily supports functional requirements of the system View of Participating Classes:. A class diagram that shows a use case realization’s participating classes and their relationships. Shows all classes whose instances collaborate to perform use case.. Ensures consistency in use case implementation across subsystem boundaries.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 11  Multiplicity  Role names  Aggregation Key Concepts Multiplicity: Defines number of objects that participate (and are linked) in relationship; Aggregation: Specialized form of association where a whole is related to its part(s). Is known as a ‘part of’ or containment relationship. Has open diamond next to class denoting the aggregate (whole). Role Names: Can be used instead of association names; Is a noun indicating purpose or capacity wherein one class associates with another; Placed on association near class it modifies; Can be placed on one or both ends of association line. (Not necessary to use both.)

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 12 Build Classes:  Objectives  Add a class.  Create VOPC class diagram.  Create a VOPC diagram from a script.  Run a report to show class instances  Run a report to show usage.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 13 Add a Class Documentation added Stereotype indicated Entity class added to browser In Logical View, right click Design Model; New; Class; type Student (namespace warning) Right click Student; Open Specification; In stereotype list: entity; In Documentation field type: A person enrolled in classes at the university; Analysis mechanism: persistency, security. Click OK. Notice what happens to the class in the browser; Keep model open…

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 14 Attribute added Operation added Attributes added to class specification Operations added to class specification Add a Class (continuing) Add Attributes: Right click Student; New; type Address over Name Repeat steps for additional attributes. When done adding attributes, Right click Student class; Open Specs; Click Attributes to view your additions. Add Operations: Right click Student; New; Click operation, then type: //get tuition over opname. Continue to add additional operations. At end, Right click Student class, Open Specs, click Operations to view additions.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 15 Create a VOPC Class Diagram VOPC class diagram added to browser Add the class diagram In the browser, expand Logical View, Design Model, and expand Use Case Realizations. Expand Use Case Realizations – Register for Courses Right click Register for Courses. New; click Class Diagram (note class diagram symbol.) Type Register for Courses - Basic Flow (VOPC) over NewDiagram. Double-click on Register for Courses - Basic Flow (VOPC). The class diagram window is displayed.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 16 Classes added to diagram Bird’s eye view Create a VOPC Class Diagram Add participating classes In the browser, drag the RegisterForCoursesForm boundary class onto the diagram. Repeat step 1 for the remaining classes. Arrange the diagram. Keep model open For large diagrams like this one, use the bird’s eye view. Click the small hand in the lower right corner of diagram. Now scroll freely around the diagram. To show class attributes and/or operations, right-click the class. Click Options; then click Show All Attributions and/or Show All Operations.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 17 Create a VOPC Class Diagram - more Unidirectional associations added Bi-directional associations Aggregation Generalization Add associations and relationships Make sure all associations and relationships are on your toolbar. (IF not, add them) Add all associations and relationships as appropriate. Note two bi-directional associations between Schedule & CourseOffering classes. Bi-directional associations allow information to flow in both directions. Classes can have more than one message passing between them. You can apply the “by value” adornment to an aggregate relationship between two classes to show that an instance of one class allocates storage for and has within it an instance of the other class.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 18 Create a VOPC Class Diagram - more… Multiplicity added Role name added Add role names Double-click the association between the RegistrationController and Student classes. The Association Specification is displayed. In the Role A field, type registrant. Click OK. Note that you’ve used Role A because registrant modifies the Student class. Repeat steps 1 and 2 for the role name modifying the Schedule class.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 19 Create a VOPC Class Diagram - more… Add multiplicity Double-click the association between the RegistrationController & CourseCatalogSystem The Association Specification is displayed. Click the Role A Detail tab. In the Multiplicity list, click 1. Click the Role B Detail tab. In the Multiplicity list, click 0..n. Click OK.. Common multiplicity indicators  1 Exactly one 0..1 Zero or one  0..* Zero or more Specific range (5, 6, 7, or 8)  1..* One or more 4..7,9 Specific range (4, 5, 6, 7, or 9) Multiplicity added Role name added

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 20 Run Script to Generate VOPC Diagram Green start arrow is pressed VOPC diagram name added Run a script to add VOPC diagram Expand Logical View; Expand Design Model; expand Use Case Realizations; Double-click Traceabilities. In the diagram window, click the Register for Course use case realization. On the Tools menu, click Open Script. Open C:\RoseSolutions\Scripts, then double-click VOPC.ebs..On the toolbar, click the green start arrow to run script. The Class Diagram window is displayed. Type Register For Courses - Basic Flow (VOPC), then click OK. In the browser, expand Use Case Realization - Register for Courses VOPC diagram. You may move classes and clean up diagram.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 21 Show Instances Class selected Show Instances selected List of diagrams is displayed If your model is large, you may want list of all the interaction diagrams on which a class appears. The Show Instances report is an easy way to view this information. Run the Show Instances report Browser; expand the Logical View; expand Design Model; expand Use Case Realizations. Expand Use Case Realizations - Register for Courses, then expand Register for Courses. Double-click the Register for Courses - Basic Flow (VOPC) class diagram. Click a class. On the Report menu, click Show Instances. The Show Instances window is displayed. Browse through the window to view the interaction diagrams on which the class appears. Now, let’s run another report. Leave your diagram open.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 22 Show Usage Class selected Show Usage selected List of locations is displayed Again, if your model is large, you may want a list of where a selected element is used in the model. Note that this report can be run for actors, use cases, use case realizations,…. Run the Show Usage report 1. Click a class. 2. On the Report menu, click Show Usage. The Show Usage window is displayed. 3. Browse through the window to view where the selected class is used in the model. Pause a moment and review our preferred practices.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 23 Preferred Practices  Class Design  Relationships Generalization  Use for “is a” relationships.  Don’t use simply to make definitions visible, except for > classes. Aggregation  Use for “part of” relationships.  Don’t use in place of dependency between loosely coupled classes. Navigability  Reduce bi-directional to unidirectional relationships, where possible.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 24  Relationships Names  Name roles and/or name associations when meaningful for the associations.  You don’t need to name everything.  Name associations or roles, not both.  Know there are different choices for different associations.  Multiplicity (cardinality) Explicitly, specify multiplicity. Preferred Practices

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 25  Completion Specification Descriptions  On creation, enter brief descriptions for all elements— class, attribute, and operation.  Use for data dictionary.  Include to convey a clear purpose to multiple readers. Attribute specifications during design  A type  A default value, when possible  Private access (rarely need public access) Preferred Practices

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 26  Completion Specification Operation specifications during design  Return type  Parameter definitions  Parameter default values  Limit use of public access Preferred Practices Operations The primary mechanism to access attributes is through operations. Rose defaults all operations to public access. During analysis, this is appropriate. During design, however, limit the use of public access to only where it is needed. The more limited the public interface, the more freedom there is to change the implementation.

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 27  Dependencies Create dependency relationships for  Attributes whose types is a class use association (field visibility.  Operations whose return type is a class use dependency (parameter visibility).  Operations whose parameters are classes’ uses dependencies (parameter visibility).  Operations whose implementation creates objects of class uses dependencies (local visibility). Preferred Practices

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 28  VOPC class diagram  Create diagram in its use case realization package.  Create at least one diagram for each use case realization.  Show classes and relationships needed to support interactions. Preferred Practices

Introduction to Rational Rose 2000 v6.5 Copyright © 1999 Rational Software, all rights reserved 29