UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

Chapters 7 & 9 System Scope
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Department of Computing
Chapter 15: System Modeling with UML
UML – Class Diagrams.
Chapter 14 (Web): Object-Oriented Data Modeling
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 16 Object Oriented Design I.
Chapter 14: Object-Oriented Data Modeling
Unified Modeling Language
Introduction to UML CS A401. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CMIS 470 Structured Systems Design
Unified Modeling Language
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Prepared by Afra`a Sayah. Introduction. Weekly Tasks. Plane Phase. Analysis Phase. Design Phase. Report Rules. Conclusion. 2.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
UML Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
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.
An Introduction to the Unified Modeling Language
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Software Engineering Software Engineering - Mr. Ahmad Al-Ghoul.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Software Engineering Lecture 8 Object-Oriented Analysis.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
UML (Unified Modeling Language)
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
1 After the scenarios are formulated Find all the use cases in the scenario Describe each of these use cases in more detail Participating actors Describe.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
System modeling and the Unified Modeling Language (UML) CS
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
CHAPTER
Introduction to UML.
UML Diagrams: Class Diagrams The Static Analysis Model
Introduction to UML.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Chapter 11 Object-Oriented Design
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
UML Diagrams: The Static Model Class Diagrams
Software Engineering Lecture #11.
Systems Analysis and Design With UML 2
UML Class Diagram.
Object Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Use Case Model Use case diagram – Part 2.
CSE470 Software Engineering UML Lecture.  UML resource page
Presentation transcript:

UML CSE 470 : Software Engineering

Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful for OO design –Not a process –Independent of implementation language What is UML?

Types of UML Diagrams 1. Use Case Diagram: capture requirements. Clarify exactly what the system is supposed to do 2. Class Diagram: static relationships between classes. Describe the types of objects in the system and various kinds of static relationship that exist among them. 3. Activity Diagram: Through an activity diagram, the designer/analyst specifies the essential sequencing rules the method or use case has to follow

Use Case Diagram

Use Case Diagrams: A series of actions performed by user Use case diagrams represent external behavior Use case diagrams are useful as an index into the use cases

Actor An actor models an external entity which communicates with the system:  User  External system  Physical environment An actor has a unique name and an optional description. Examples:  Passenger: A person in the train  GPS satellite: Provides the system with GPS coordinates Passenger

Actor Primary actor: interact to achieve required system function and derive the intended Secondary actor: support the system so that primary actors can do their work. It is important to note that an actor and an end user are not necessarily the same thing.

Use case A use case represents a class of functionality provided by the system as an event flow. A use case consists of: Unique name Participating actors Entry conditions Flow of events Exit conditions PurchaseTicket

Use Case Diagrams Library System Borrow Order Title Fine Remittance Client Employee 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

Object oriented approach?

Use Case Diagram(core relationship) Include: a dotted line labeled > beginning at base use case and ending with an arrows pointing to the include use case. An “Include” relationship is used to indicate that a particular Use Case must include another use case to perform its function. > A Use Case may be included by one or more Use Cases, so it reduces duplication of functionality. Example: the Use Case may be included every time when the Use Case is run.

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”. > Used when exceptional circumstances are encountered. For example, the Use Case may optionally extend the regular Use Case.

Example Problem: Develop a system where a patient can make an appointment, cancel his appointment and pay bill to the corresponding authority

Example At first, try to define your actors List the set of user cases Connect each user cases to an actor Show the relation between each user cases

An approach of Jacobson Who is the primary actor, the secondary actor(s)? What are the actor’s goals? What preconditions should exist before the story begins? What main tasks or functions are performed by the actor? What exceptions might be considered as the story is described? What variations in the actor’s interaction are possible? What system information will the actor acquire, produce, or change? Will the actor have to inform the system about changes in the external environment? What information does the actor desire from the system? Does the actor wish to be informed about unexpected changes?

Practice yourself

Solution

Use Case Diagrams (cont.) Pay Bill is a parent use case and Bill Insurance is the child use 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)

Use Cases are useful to… Determining requirements  New use cases often generate new requirements as the system is analyzed and the design takes shape. Communicating with clients  Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. Generating test cases  The collection of scenarios for a use case may suggest a suite of test cases for those scenarios.

Class Diagram

A class is a description of a set of objects Each class is represented by a rectangle subdivided into three compartments  Name  Attributes  Operations Class Diagram

Notation: Classes Window origin size open() close() move() display() name attributes operations

The "Hello, World" Example import java.awt.Graphics; class HelloWorld extends java.applet.Applet { public void paint (Graphics g) { g.drawString ("Hello, World!", 10, 10); } Example from: BJR

HelloWorld paint() class name operations The "Hello, World" Example

HelloWorld paint() g.drawString ("HelloWorld", 0, 10)" class name operations annotation The "Hello, World" Example

UML Class Notation A class is a rectangle divided into three parts  Class name  Class attributes (i.e. data members, variables)  Class operations (i.e. methods) Modifiers  Private: -  Public: +  Protected: #  Static: Underlined Abstract class: Name in italics

UML Class Notation

Lines or arrows between classes indicate relationships  Association  A relationship between instances of two classes, where one class must know about the other to do its work, e.g. client communicates to server  indicated by a straight line or arrow  Aggregation  An association where one class belongs to a collection, e.g. instructor part of Faculty  Indicated by an empty diamond on the side of the collection  Composition  Strong form of Aggregation  Lifetime control; components cannot exist without the aggregate  Indicated by a solid diamond on the side of the collection  Inheritance  An inheritance link indicating one class a superclass relationship, e.g. bird is part of mammal  Indicated by triangle pointing to superclass

Binary Association myB.service();myA.doSomething() ; Binary Association: Both entities “Know About” each other Optionally, may create an Associate Class

Unary Association A knows about B, but B knows nothing about A Arrow points in direction of the dependency myB.service();

Aggregation Aggregation is an association with a “collection-member” relationship void doSomething() aModule.service(); Hollow diamond on the Collection side No sole ownership implied

Composition Composition is Aggregation with: Lifetime Control (owner controls construction, destruction) Part object may belong to only one whole object Filled diamond on side of the Collection members[0] = new Employee(); … delete members[0];

Inheritance Standard concept of inheritance class B() extends A … Base Class Derived Class

UML Multiplicities MultiplicitiesMeaning 0..1 zero or one instance. The notation n.. m indicates n to m instances. 0..* or * no limit on the number of instances (including none). 1exactly one instance 1..*at least one instance Links on associations to specify more details about the relationship

UML Class Example

Activity Diagram

Activity diagram Activity diagram supplements the use case by providing a graphical representation of the flow of interaction within a specific scenario Similar to the flowchart

Activity diagram: notation Rounded rectangles to imply a specific system function, Arrows to represent flow through the system, Decision diamonds to depict a branching decision Solid horizontal lines to indicate that parallel activities are occurring

Activity diagram for Access camera surveillance via the Internet—display camera views function

Thank you

References Cornell University, USA Shiyuan Jin, Fall 2006 (Student in UCR) Shiyuan Jin, Fall 2006 (Student in UCR) Roger s. pressman, Software Engineering a practitioners approach, 7 th ed