Before we start Project Group A note about class project ArgoUML

Slides:



Advertisements
Similar presentations
Software analysis and design tools T120B pavasario sem.
Advertisements

A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Slides by Bruegee and Dutoit, Modified by David A. Gaitros COP 3331 Object Oriented Analysis and Design Chapter 2: Object Oriented Modeling using UML Jean.
Unified Modeling Language (UML) Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 5, 2001 Introduction.
Using UML, Patterns, and Java Object-Oriented Software Engineering Modeling with UML Chapter 2 Object-Oriented Software Engineering: Using UML, Patterns,
Unified Modeling Language (UML)
1 Modeling with UML CMPE 131 Fall Overview What is modeling? What is UML? Use case diagrams Class diagrams Sequence diagrams Activity diagrams.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Introduction to UML CS A401. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Course information and deadline reminders
COP 3331 Object-Oriented Analysis and Design 1 Modeling and UML  UML = Unified Modeling Language  Graphical Notation  Topics  Modeling  Basics of.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
© SERG Software Design (UML) Software Design Static Modeling using the Unified Modeling Language (UML) Material based on [Booch99, Rambaugh99, Jacobson99,
Introduction to Software Engineering ECSE-321 Unit 5 – Modeling with UML.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Modeling with UML Chapter 2 Object-Oriented Software Engineering: Using UML, Patterns, and Java, 2 nd Edition By B. Bruegge and A. Dutoit Prentice Hall,
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
 A software application is like a city  Modeling = Architecture  OOP = Civil Engineering  UML Classes = Blueprints of Buildings  UML is a common.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Sept. 25, 2003CS WPI1 CS 509 Design of Software Systems Lecture #4 Thursday, Sept. 25, 2003.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
Jan. 26, 2004CS WPI1 CS 509 Design of Software Systems Lecture #2 Monday, Jan. 26, 2004.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
COP 3331 OBJECT-ORIENTED ANALYSIS AND DESIGN Bob Myers Department of Computer Science.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
UML Review Overview: modeling with UML  What is modeling?  What is UML?  Use case diagrams  Class diagrams  Sequence diagrams  Activity diagrams.
CEN 5011 Advanced Software Engineering
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
UML. Model An abstract representation of a system. Types of model 1.Use case model 2.Domain model 3.Analysis object model 4.Implementation model 5.Test.
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.
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
Fundamentals of Object Oriented Modeling
Introduction to UML.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Review.
Modeling with UML Chapter 2
Chapter 2, Modeling with UML
Introduction to UML.
Chapter 5 System modeling
The Movement To Objects
Evolution of UML.
Introduction to UML.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
CS410 – Software Engineering Lecture #17: UML I
Chapter 2, Modeling with UML
Introduction to Unified Modeling Language (UML)
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Systems Analysis and Design With UML 2
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Introduction to UML.
Chapter 2, Modeling with UML
Software Design Lecture : 15.
Dynamic Modeling Lecture # 37.
CS410 – Software Engineering Lecture #9: UML
Chapter 2, Modeling with UML
Presentation transcript:

Before we start Project Group A note about class project ArgoUML Focus on system functions instead of fancy interfaces. ArgoUML

Chapter 2: Modeling with UML

Overview: modeling with UML What is modeling? What is UML? Use case diagrams Class diagrams Sequence diagrams Activity diagrams Statechart diagrams

What is modeling? Modeling consists of building an abstraction of reality. Abstractions are simplifications because: They ignore irrelevant details and They only represent the relevant details. What is relevant or irrelevant depends on the purpose of the model.

Example: street map

Why model software? Why develop models for software? Software is getting increasingly more complex Windows XP > 40 mio lines of code A single programmer cannot manage this amount of code in its entirety. Code is not easily understandable by developers who did not write it Read code vs. read model We need simpler representations for complex systems Modeling is a mean for dealing with complexity

Systems, Models and Views A model is an abstraction describing a subset of a system A view depicts selected aspects of a model A notation is a set of graphical or textual rules for depicting views Views and models of a single system may overlap each other Examples: System: Aircraft Models: A flight simulation model Views: All blueprints, electrical wiring, fuel system

Systems, Models and Views Flightsimulator Blueprints Aircraft Electrical Wiring Scale Model

Models, Views and Systems (UML) * * System Model View Described by Depicted by Airplane: System Scale Model: Model Flight Simulator: Model Blueprints: View Fuel System: View Electrical Wiring: View

System and Model (Cont.) I-285 Traffic Model Maintenance Cost Model Rush hour traffic Spatial distribution of accidents

Concepts and Phenomena Phenomenon An object in the world of a domain as you perceive it Example: The lecture you are attending Example: My black watch Concept Describes the properties of phenomena that are common. Example: Lectures on software engineering Example: Black watches Concept is a 3-tuple: Name (To distinguish it from other concepts) Purpose (Properties that determine if a phenomenon is a member of a concept) Members (The set of phenomena which are part of the concept)

Concepts and phenomena Members Name Clock Purpose A device that measures time. Abstraction Classification of phenomena into concepts Modeling Development of abstractions to answer specific questions about a set of phenomena while ignoring irrelevant details.

Concepts in software: Type and Instance An abstraction in the context of programming languages Name: int, Purpose: integral number, Members: 0, -1, 1, 2, -2, . . . Instance: Member of a specific type The type of a variable represents all possible instances the variable can take The following relationships are similar: “type” <–> “instance” “concept” <–> “phenomenon”

Abstract Data Types & Classes Special type whose implementation is hidden from the rest of the system. Example: List, Queue, Set, Stack, etc. Class: An abstraction in the context of object-oriented languages Like an abstract data type, a class encapsulates both state (variables) and behavior (methods) Class Vector Unlike abstract data types, classes can be defined in terms of other classes using inheritance

Application and Solution Domain Application Domain (Requirements Analysis): The environment in which the system is operating Solution Domain (System Design, Object Design): The available technologies to build the system Different models for different domain

What is UML? UML (Unified Modeling Language) An emerging standard for modeling object-oriented software. Resulted from the convergence of notations from three leading object-oriented methods: OMT (James Rumbaugh) OOSE (Ivar Jacobson) Booch (Grady Booch) Reference: “The Unified Modeling Language User Guide”, Addison Wesley, 1999. Supported by several CASE tools Rational ROSE TogetherJ

UML: First Pass You can model 80% of most problems by using about 20 % UML We teach you those 20%

UML First Pass Use case Diagrams Class diagrams Sequence diagrams Describe the functions of the system as seen by the user. Class diagrams Describe the static structure of the system: Objects, Attributes, Associations Sequence diagrams Describe the dynamic behavior between actors and the system and between objects of the system Statechart diagrams Describe the dynamic behavior of an individual object (essentially a finite state automaton) Activity Diagrams Model the dynamic behavior of a system, in particular the workflow (essentially a flowchart)

Function, Structure, and Behavior Consider a Wheelchair What is the function What is the structure What is the (dynamic) behavior

UML first pass: Use case diagrams System Boundary Use case Watch Actor ReadTime WatchUser WatchRepairPerson SetTime ChangeBattery Use case diagrams represent the functionality of the system from user’s point of view

UML first pass: Class diagrams Class diagrams represent the structure of the system Association Class Multiplicity Watch 1 blinkIdx blinkSeconds() blinkMinutes() blinkHours() stopBlinking() referesh() LCDDisplay 1 Battery load 1 2 1 Time now 2 PushButton state push() release() Attribute Operations

UML first pass: Sequence diagram Actor Object :WatchUser :Watch :LCDDisplay :Time pressButton1() blinkHours() pressButton1() blinkMinutes() Message pressButton2() incrementMinutes() refresh() pressButtons1And2() commitNewTime() stopBlinking() Activation Lifeline Sequence diagrams represent the behavior as interactions

Represent behavior as states and transitions UML first pass: Statechart diagrams for objects with interesting dynamic behavior State Event Initial state Transition Final state Represent behavior as states and transitions

Other UML Notations UML provide other notations that will be introduced in subsequent lectures, as needed. Implementation diagrams Component diagrams Deployment diagrams Introduced in lecture on System Design Object constraint language Introduced in lecture on Object Design

Note: Follow the textbook’s standard in this class UML Core Conventions Rectangles are classes or instances Ovals are functions or use cases Instances are denoted with an underlined names myWatch:SimpleWatch Joe:Firefighter Types are denoted with non underlined names SimpleWatch Firefighter Diagrams are graphs Nodes are entities Arcs are relationships between entities Note: Follow the textbook’s standard in this class

Use Case Diagrams Passenger PurchaseTicket Used during requirements elicitation to represent external behavior Actors represent roles, that is, a type of user of the system Use cases represent a sequence of interaction for a type of functionality The use case model is the set of all use cases. It is a complete description of the functionality of the system and its environment Passenger PurchaseTicket

Actors 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

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 Special requirements PurchaseTicket

System Boundary Passenger PurchaseTicket TicketSystem Passenger PurchaseTicket A system boundary rectangle separates the ticket system from the external actors

A Template to Describe Use Cases Name Participating actors Entry conditions Flow of events Exit conditions Quality requirements Written in natural language

A Use Case Example Name: Purchase ticket Participating actor: Passenger Entry condition: Passenger standing in front of ticket distributor. Passenger has sufficient money to purchase ticket. Exit condition: Passenger has ticket. Event flow: 1. Passenger selects the number of zones to be traveled. 2. Distributor displays the amount due. 3. Passenger inserts money, of at least the amount due. 4. Distributor returns change. 5. Distributor issues ticket.

Use Case and Scenario A use case is an abstract that describes all possible scenarios involving the described functionality A scenario is an instance of a use case describing a concrete set of actions. The focus of a scenario is on understandability The focus on a use case is on completeness

Use Case and Scenario Name: Purchase ticket Participating actor: Passenger Entry condition: Passenger standing in front of ticket distributor. Passenger has sufficient money to purchase ticket. Exit condition: Passenger has ticket. Event flow: 1. Passenger selects the number of zones to be traveled. 2. Distributor displays the amount due. 3. Passenger inserts money, of at least the amount due. 4. Distributor returns change. 5. Distributor issues ticket. On August 28th, 2008, John standed in front of a ticket distributor in Atlanta Hartsfield Airport….

Use Case Example Anything missing? Exceptional cases! Name: Purchase ticket Participating actor: Passenger Entry condition: Passenger standing in front of ticket distributor. Passenger has sufficient money to purchase ticket. Exit condition: Passenger has ticket. Event flow: 1. Passenger selects the number of zones to be traveled. 2. Distributor displays the amount due. 3. Passenger inserts money, of at least the amount due. 4. Distributor returns change. 5. Distributor issues ticket. Anything missing? Exceptional cases!

The <<extends>> Relationship <<extends>> relationships represent exceptional or seldom invoked cases. The exceptional event flows are factored out of the main event flow for clarity. Use cases representing exceptional flows can extend more than one use case. The direction of a <<extends>> relationship is to the extended use case Passenger PurchaseTicket OutOfOrder <<extends>> Cancel <<extends>> TimeOut <<extends>> NoChange <<extends>>

The <<includes>> Relationship Passenger <<includes>> relationship represents behavior that is factored out of the use case. <<includes>> behavior is factored out for reuse, not because it is an exception. The direction of a <<includes>> relationship is to the using use case (unlike <<extends>> relationships). PurchaseMultiCard PurchaseSingleTicket <<includes>> CollectMoney <<includes>> NoChange <<extends>> Cancel <<extends>>

A Medical Clinic Example A scenario -- “A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot” “A patient can request or discuss medication with a doctor” Pay Bill

Use Case Diagrams: Summary Use case diagrams represent external behavior Use case diagrams are useful as an index into the use cases Use case descriptions provide meat of model. All use cases need to be described for the model to be useful. An Actor is a role of an object or objects outside of a system that interacts directly with it as part of a coherent work unit (a use case) <<includes>> and <<extends>> allow common fragments of use cases to be pulled out into a separate use cases <<includes>> is like a “use case subroutine” <extends>> is an alternative course of action Generalization

About Project Report Cover page Table of Content Revision history Put in a folder “Soft” points about grading your reports 5 points for appearance (including format) 5 points for content – overall impression about the content of your report (e.g., by comparing with other groups’ reports). The other 90 points are about the completeness (e.g., if you finish all the required sections of the report) and correctness (e.g., if your use case description is correct/informative or not).