1 The Object-oriented Paradigm and The Unified Modeling Language (UML)

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

Karolina Muszyńska Based on:
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Ch 12: Object-Oriented Analysis
CS3773 Software Engineering Lecture 03 UML Use Cases.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
1 Building an Analysis Model of the System Under Development.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Systems Analysis and Design in a Changing World, Fourth Edition
Object Oriented System Development with VB .NET
1 Brief Review of the Object-oriented Paradigm, Object-oriented Analysis and Design Object-oriented paradigm.
1 The Object-oriented Paradigm and The Unified Modeling Language (UML)
The Object-oriented Paradigm and The Unified Modeling Language (UML)
Systems Analysis & Design Sixth Edition Systems Analysis & Design Sixth Edition Toolkit Part 5.
Object-Oriented Analysis
Embedded Systems Software: Modeling and Programming--
UML for Embedded Systems Development--Revisited. table_05_00 * * * * *
UML for Embedded Systems Development— Extensions; Hardware-Software CoDesign.
Chapter 7: The Object-Oriented Approach to Requirements
Introduction To System Analysis and design
CMIS 470 Structured Systems Design
Programming Languages and Paradigms Object-Oriented Programming.
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Object-Oriented Software Testing. C-S 5462 Object-Oriented Software Testing Research confirms that testing methods proposed for procedural approach are.
Introduction to Object-oriented programming and software development Lecture 1.
An Object-Oriented Approach to Programming Logic and Design
Intro to UML - OO Class Diagrams Week 5 CMIS570. Plan for Tonight Object terms Unified Modeling Language history Class Diagrams Intro to Oracle Oracle.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
Use Cases 1. Last week  Introduction to software engineering  How is it different from traditional engineering?  Introduction to specification  Operational.
1 Embedded Systems Software: Modeling and Programming-- The Object-oriented Paradigm and The Unified Modeling Language (UML); Extensions to HW / SW Systems.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
Information System Design (IT60105) Lecture 26 Object-Oriented System Testing.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Unified Modeling Language User Guide Section 4 - Basic Behavioral Modeling Chapter 16 - Use Cases Chapter 17 - Use Case Diagrams.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Basic Concepts of Object Orientation Object-Oriented Analysis CIM2566 Bavy LI.
Systems Analysis and Design in a Changing World, Fourth Edition
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
OOP Review CS 124.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
UML (Unified Modeling Language)
1 Building an Analysis Model of the System Under Development.
UML Review of Use case diagrams. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson,
1 The Object-oriented Paradigm and The Unified Modeling Language (UML)
Object-Oriented Systems. Goals Object-Oriented Methodologies – The Rumbaugh et al. OMT – The Booch methodology – Jacobson's methodologies.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Basic Characteristics of Object-Oriented Systems
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Systems Analysis and Design
Use cases, tests classes, …
Systems Analysis and Design With UML 2
SafeHome Product.
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object Oriented Analysis and Design
Building an Analysis Model of the System Under Development
Chapter 20 Object-Oriented Analysis and Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

1 The Object-oriented Paradigm and The Unified Modeling Language (UML)

2 "problems" of software development (review): **conceptual integrity **incremental build, progressive refinement **large projects "differ" from small ones programming paradigms (1950’s-present): attempts to deal effectively with these problems, make software easier to develop and to maintain Problems of software development

3 Computer Language / Design Methodology: brief history: 1950's:unstructured, no information hiding--”spaghetti” code, GOTO, flowcharts --machine code --assembly lang. --FORTRAN, LISP (Algol; COBOL) 1980’s: structured, top-down design (“3 basic control structures, no GOTO”), modularity --Pascal --(C) --Ada 1990’s: encapsulation, information-hiding, reuse, hardware/software codesign --C++ --Java 2000’s: info hiding; web languages; environments encapsulating multiple languages, styles --.NET --Python --MATLAB Languages and design methodology

4 Important basic OO concepts: class: encapsulates data structure (object) and associated methods (functions) these may be declared public / private / protected appropriate uses: public: pass info to object or request info about object (use "messages") (can be used by anyone) private: modify object (can be used in class or by “friends”) protected: for descendants (in class or by derived class and “friends”) OO class

5 traditional: record (struct): functions to use or modify this record can be anywhere in the program OO: class concept supports encapsulation, information hiding Record/class DATA Procedural Prog. OO Prog.

6 Useful OO techniques: Inheritance: ex: in a program modeling an ecosystem, we might have the relationships: wolf is carnivore; sheep is herbivore; grass is plant carnivore is animal; herbivore is animal animal is organism; plant is organism here the base class “organism” holds data fields which apply to all organisms, e.g., amount of water needed to survive two derived classes, plant and animal, hold information specific to each of these types of organisms, e.g., kind of soil preferred by plant the animal class also has two derived classes, wolf and sheep Inheritance allows the collection of common attributes and methods in "base" class and inclusion of more specific attributes and methods in derived classes Inheritance A.A. B.B. Ex: Object data structures: A. Base class B. Derived class XYZXYZ XYZWXYZW

7 Polymorphism: base class can define a “virtual” function; appropriate versions of this function can be instantiated in each derived class (e.g., "draw" in the base class of graphical objects can have its own specific meaning for rectangles, lines, ellipses) Overloading: ex: cin >> num1; >> is overloaded "shift” ex: “+” can be overloaded to allow the addition of two vectors ex: a function name can be overloaded to apply to more than one situation; e.g., a constructor can be defined one way if initial values are given and a different way if initial values are not given Polymorphism and overloading

8 Templates: example: template T method1 (T x) ….. can be specialized:int method1 (int x) float method1 (float y) usertype method1 (usertype a) templates promote reuse Templates

9 Separate compilation: Typically, an object-oriented program can be broken into three sets of components:  definitions and prototypes (text files, “header files”)  implementations (compiled--source code need not be available to user)  application program--uses the classes defined in header files and supported by the implementation files This strategy promotes reuse and information hiding Separate compilation

10 Note: no paradigm is misuse-proof Misuse of object-oriented paradigm

11 Developing an OO project: we will use UML (subset) determine specifications: use cases determine classes and connections (static behavior): ER or class diagrams CRC cards model dynamic behavior: interaction (object message) diagrams activity diagrams state diagrams sequence diagrams Using OO & UML in quarter project

12 UML: a language for specifying and designing an OO project UML: stands for "unified modeling language” unifies methods of Booch, Rumbaugh (OMT or Object Modeling Technique), and Jacobson (OOSE or Object-Oriented Software Engineering) mainly a modeling language, not a complete development method Early versions -- second half of the 90's Not all methods we will use are officially part of the UML description

13 USE CASES: a part of the ”Unified Modeling Language" (UML) which we will use for requirements analysis and specification each identifies a way the system will be used and the "actors" (people or devices) that will use it (an interaction between the user and the system) each use case should capture some user-visible function and achieve some discrete goal for the user an actual user can have many actor roles in these use cases an instance of a use case is usually called a "scenario” Use case will typically have graphical & verbal forms Use cases

14 Example: cellular network place and receive calls use case (based on Booch, Rumbaugh, and Jacobson, The Unified Modeling Language User Guide) Example use case System boundary Text description --Use case name (cellular network place and receive calls) --Participating actors (cellular network and human user) --Flow of events (network or user accesses network to use its functionality) --Entry condition(s) (user accesses network using device or password) --Exit condition(s) (call completed lost or network busy) --Quality requirements (speed, service quality) Text description—gives important details Use case diagram—summarizes, provides system overview

15 use case Text description: Use case name Participating actors Flow of events Entry condition(s) Exit condition(s) Quality requirements

16 Use case—detailed example (Pressman) Example: “SAFEHOME” system (Pressman) Use case: InitiateMonitoring (Pressman text categories: Primary actor (1) Goal in context (2) Preconditions (3) Trigger (4) Scenario (5) Exceptions (6) Priority (system development) (7) When available (8) Frequency of use (9) Channel to actor (10) Secondary actors (11) Channels to secondary actors (12) Open issues (13) ) Arms/disarms system Accesses system via internet Responds to alarm event Encounters an error condition Reconfigures sensors and related system features Homeowner System administrator Sensors Pressman, p. 163, Figure 7.3

17 Use case—detailed example (Pressman) Example: “SAFEHOME” system (Pressman) Use case name: InitiateMonitoring Participating actors: homeowner, technicians, sensors Flow of events (homeowner): --Homeowner wants to set the system when the homeowner leaves house or remains in house --Homeowner observes control panel --Homeowner enters password --Homeowner selects “stay” or “away” --Homeowner observes that read alarm light has come on, indicating the system is armed

18 Use detailed example (Pressman)--continued Entry condition(s) Homeowner decides to set control panel Exit condition(s) Control panel is not ready; homeowner must check all sensors and reset them if necessary Control panel indicates incorrect password (one beep)— homeowner enters correct password Password not recognized—must contact monitoring and response subsystem to reprogram password Stay selected: control panel beeps twice and lights stay light; perimeter sensors are activated Away selected: control panel beeps three times and lights away light; all sensors are activated

19 Use case—detailed example (Pressman) Quality requirements: Control panel may display additional text messages time the homeowner has to enter the password from the time the first key is pressed Ability to activate the system without the use of a password or with an abbreviated password Ability to deactivate the system before it actually activates

20 Use case additions—simplifications of use case descriptions A. Include: one use case includes another in its flow of events (cases A and B both include case C) B.Extend: extend one use case to include additional behavior (cases D and E are extensions of case F) A B C > F E D

21 Use case additions C. Inheritance: one use case specializes the more general behavior of another G and H specialize behavior of J) H J authenticate Authenticate with card Authenticate with password G

22 Use case continued Examples: what would be a use case for: vending machine user university student management system (e.g., student changes registration) Use case name Participating actors Flow of events Entry condition Exit condition Quality requirements

23 Note: Use cases can form a basis for system acceptance tests For each use case: Develop one or more system tests to confirm that the use case requirements will be satisfied Add explicit test values as soon as possible during design phase These tests are now specifically tied to the use case and will be used as the top level acceptance tests Do not forget use cases / tests for performance and usability requirements (these may be qualitative as well as quantitative) System Tests

24 Example—bank simulation (Horstmann) Teller 1 Teller 2 Teller 3 Teller 4 Customer 1Customer 3Customer 2 Horstmann, Mastering Object- Oriented Design in C++, Wiley, 1995

25 Use Cases--Bank Goal: Develop a tool to simulate the bank to decide on optimal values for number of tellers, number of customer queues, etc. Use cases?