Software analysis and design tools T120B029 2004 pavasario sem.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
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.
Chapter 2, Modeling with UML, Part 2
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML First Pass: Class Diagrams Battery load()
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.
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 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.
Unified Modeling Language(UML) BY
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML.
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.
Unified Modeling Language, Version 2.0
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.
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 1 Object Modeling.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Sept. 25, 2003CS WPI1 CS 509 Design of Software Systems Lecture #4 Thursday, Sept. 25, 2003.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
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.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 4, Requirements Elicitation: Functional Modeling.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.
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.
1 Unified Modeling Language, Version 2.0 Chapter 2.
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
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
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.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Introduction to UML.
Chapter 2, Modeling with UML
UML Review.
Modeling with UML Chapter 2
Chapter 2, Modeling with UML
Evolution of UML.
UML Class Diagrams.
Before we start Project Group A note about class project ArgoUML
Software Lifecycle Activities
CS410 – Software Engineering Lecture #17: UML I
Systems Analysis and Design With UML 2
Chapter 2, Modeling with UML
Introduction to Unified Modeling Language (UML)
Chapter 2, Modeling with UML
Chapter 2, Modeling with UML
Introduction to UML.
Chapter 4, Requirements Elicitation: Functional Modeling
Chapter 4, Requirements Elicitation: Functional Modeling
CS410 – Software Engineering Lecture #9: UML
Chapter 2, Modeling with UML
Presentation transcript:

Software analysis and design tools T120B pavasario sem.

2 Instructor: Eduardas Bareiša, Associate Professor Department of Software Engineering Studentų Office Hours: Monday 8: :00, Friday 8: :00 Lectures Hours: Tuesday 12: :00; Labs Hours: Monday 08: :45; 10: :45; Tuesday 10: :45; Thursday 17: :15; Friday 08: :45; phone: www. soften.ktu.lt/~edas/t120b029 T120B029

3 Textbooks Craig Larman, Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process,2/e (ISBN: ) Ian Sommerville, Software Engineering 6th Edition T120B029

4 LINKS ters/software/omt.htmhttp:// ters/software/omt.htm ters/software/oose.htmhttp:// ters/software/oose.htm ters/software/booch.htmhttp:// ters/software/booch.htm ters/uml/uml.htmhttp:// ters/uml/uml.htm T120B029

5 Software Lifecycle Activities Application Domain Objects SubSystems class... Implementat ion Domain Objects Source Code Test Cases ? Expressed in Terms Of Structured By Implemented By Realized By Verified By System Design Object Design Implemen- tation Testing class.... ? Requirements Elicitation Use Case Model Requirements Analysis T120B029

6 Products of Requirements Process Requirements Elicitation analysis model :Model system specification :Model Analysis T120B029

Modeling with UML T120B029

8 Why model software? Software is already an abstraction: why model software? Software is getting larger, not smaller –NT 5.0 ~ 40 million lines of code –A single programmer cannot manage this amount of code in its entirety. Code is often not directly understandable by developers who did not participate in the development We need simpler representations for complex systems –Modeling is a mean for dealing with complexity T120B029

9 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 T120B029

10 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) Supported by several CASE tools –Rational ROSE –Microsoft Visio –... T120B029

11 UML and This Course You can model 80% of most problems by using about 20% UML In this course, we teach you those 20% T120B029

12 UML First Pass Use case diagrams –Describe the functional behavior of the system as seen by the user. Class diagrams –Describe the static structure of the system: Objects, Attributes, and 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 as a finite state machine. Activity diagrams –Model the dynamic behavior of a system, in particular the workflow, i.e. a flowchart. T120B029

13 UML First Pass: Class Diagrams Battery load() 1 2 Time now() PushButton state push() release() blinkIdx blinkSeconds() blinkMinutes() blinkHours() stopBlinking() referesh() LCDDisplay SimpleWatch Class Association Multiplicity Attributes Operations Class diagrams represent the structure of the system T120B029

14 Concepts In Software: Type and Instance Type: – 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. Abstract data type: –Special type whose implementation is hidden from the rest of the system. T120B029

15 Classes A class represent a concept. A class encapsulates state (attributes) and behavior (operations). Each attribute has a type. Each operation has a signature. The class name is the only mandatory information. zone2price getZones() getPrice() TariffSchedule Table zone2price Enumeration getZones() Price getPrice(Zone) TariffSchedule Name Attributes Operations Signature TariffSchedule T120B029

16 Instances An instance represents a phenomenon. The name of an instance is underlined and can contain the class of the instance. The attributes are represented with their values. zone2price = { {‘1’,.20}, {‘2’,.40}, {‘3’,.60}} tariff_1974:TarifSchedule T120B029

17 Associations Associations denote relationships between classes. The multiplicity of an association end denotes how many objects the source object can legitimately reference. Associations should be named (added by Hartrum) Enumeration getZones() Price getPrice(Zone) TarifSchedule * price zone TripLeg * T120B029

18 1-to-1 and 1-to-Many Associations 1-to-1 association 1-to-many association * draw() Polygon x:Integer y:Integer Point 1 Has-capital name:String Country name:String City 11 T120B029

19 Qualification The qualifier improves the information about the multiplicity of the association between the classes. It is used for reducing 1-to-many multiplicity to 1-1 multiplicity With qualification: A directory has many files, each with a unique name Without qualification: A directory has many files. A file belongs only to one directory. DirectoryFile filename Directory File filename 1* T120B029

20 Aggregation An aggregation is a special case of association denoting a “consists of” hierarchy. The aggregate is the parent class, the components are the children class. 1 Exhaust SystemMufflerTailpipe 0..2 T120B029

21 Composition A solid diamond denote composition, a strong form of aggregation where components cannot exist without the aggregate. 3 TicketMachine ZoneButton T120B029

22 Generalization Generalization relationships denote inheritance between classes. The children classes inherit the attributes and operations of the parent class. Generalization simplifies the model by eliminating redundancy. Button ZoneButtonCancelButton T120B029

23 Object Types Entity Objects –Represent the persistent information tracked by the system (Application domain objects, “Business objects”) Boundary Objects –Represent the interaction between the user and the system Control Objects: –Represent the control tasks performed by the system Having three types of objects leads to models that are more resilient to change. –The boundary of a system changes more likely than the control –The control of the system change more likely than the application domain Object types originated in Smalltalk: –Model, View, Controller (MV) T120B029

24 Example: 2BWatch Objects UML provides several mechanisms to extend the language UML provides the stereotype mechanism to present new modeling elements > Year > Month > Day > ChangeDateControl > LCDDisplayBoundary > ButtonBoundary T120B029

25 Finding Participating Objects in Use Cases For any use case do the following –Find terms that developers or users need to clarify in order to understand the flow of events Always start with the user’s terms, then negotiate: –FieldOfficerStationBoundary or FieldOfficerStation? –IncidentBoundary or IncidentForm? –EOPControl or EOP? –Identify real world entities that the system needs to keep track of. Examples: FieldOfficer, Dispatcher, Resource –Identify real world procedures that the system needs to keep track of. Example: EmergencyOperationsPlan –Identify data sources or sinks. Example: Printer –Identify interface artifacts. Example: PoliceStation –Do textual analysis to find additional objects (Use Abott’s technique) –Model the flow of events with a sequence diagram T120B029

26 UML First Pass: Sequence Diagram Object Message Activation Sequence diagrams represent the behavior as interactions blinkHours() blinkMinutes() incrementMinutes() refresh() commitNewTime() stopBlinking() pressButton1() pressButton2() pressButtons1And2() pressButton1() :WatchUser :Time:LCDDisplay:SimpleWatch T120B029

27 Sequence Diagram Observations UML sequence diagrams represent behavior in terms of interactions. Complement the class diagrams which represent structure. Useful to find participating objects. Time consuming to build but worth the investment. T120B029

28 button1&2Pressed button1Pressed button2Pressed button1Pressed button1&2Pressed Increment Minutes Increment Hours Blink Hours Blink Seconds Blink Minutes Increment Seconds Stop Blinking UML First Pass: Statechart Diagrams State Initial state Final state Transition Event T120B029

29 Activity Diagrams An activity diagram shows flow control within a system An activity diagram is a special case of a state chart diagram in which states are activities (“functions”) Two types of states: –Action state: Cannot be decomposed any further Happens “instantaneously” with respect to the level of abstraction used in the model –Activity state: Can be decomposed further The activity is modeled by another activity diagram T120B029

30 Activity Diagram: Modeling Decisions T120B029

31 Activity Diagrams: Modeling Concurrency Synchronization of multiple activities Splitting the flow of control into multiple threads Synchronization Splitting Archive Incident Open Incident Document Incident Allocate Resources Coordinate Resources T120B029

32 Activity Diagrams: Swimlanes Actions may be grouped into swimlanes to denote the object or subsystem that implements the actions. Archive Incident Dispatcher FieldOfficer Open Incident Document Incident Allocate Resources Coordinate Resources T120B029

33 Other UML Notations UML provide other notations that we will be introduced in subsequent lectures, as needed. Implementation diagrams –Component diagrams –Deployment diagrams –Introduced in lecture on System Design Object Constraint Language (OCL) –Introduced in lecture on Object Design T120B029

34 Summary UML provides a wide variety of notations for representing many aspects of software development –Powerful, but complex language –Can be misused to generate unreadable models –Can be misunderstood when using too many exotic features We concentrate only on a few notations: –Functional model: use case diagram –Object model: class diagram –Dynamic model: sequence diagrams, statechart and activity diagrams T120B029

35 Analysis: UML Activity Diagram T120B029

36 Requirements Analysis Document Template 1.Introduction 2.Current system 3.Proposed system 3.1Overview 3.2Functional requirements 3.3Nonfunctional requirements 3.4Constraints (“Pseudo requirements”) 3.5System models Scenarios Use case model Object model Data dictionary Class diagrams Dynamic models User interface 4. Glossary T120B029