Using Diagrams to Represent Program Structure

Slides:



Advertisements
Similar presentations
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Advertisements

Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Systems Analysis and Design 8th Edition
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Unified Modeling Language
Object-Oriented Analysis and Design
UML for Java Programmers Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
Class, Sequence and UML Model.  Has actors and use cases.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Lecture 3: Visual Modeling & UML 1. 2 Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Systems Analysis & Design 7 th Edition Chapter 5.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
1 Class Diagrams: The Essentials. 2 Terms and Concepts A class is... The most important building block of any object-oriented system. A description of.
An Introduction to the Unified Modeling Language
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
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.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
CS 350 – Software Design UML – The Unified Modeling Language – Chapter 2 The Unified Modeling Language is a visual language used to create models of programs.
CHAPTER
Unified Modeling Language (UML)
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
Main issues: • What do we want to build • How do we write this down
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Chapter 16 UML Class Diagrams.
Unified Modeling Language—UML A Very Brief Introduction
Object-Oriented Modeling with UML
M.M. Pickard, PhD A Primer on Use Cases (Reference: UML Superstructure Specification, v2.1.1)
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction to Unified Modeling Language (UML)
Rumbaugh’s Objectmodeling Technique
Object Oriented Modeling and Design
Activity Diagrams Activity diagrams describe the workflow behavior of a system.  The diagrams describe the state of activities by showing the sequence.
The Basics of Class Diagrams for a single class
The Unified Modeling Language
Software Engineering Lecture #11.
UML Class Diagram.
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Chapter 5.
Introduction to UML Sources:
Design Yaodong Bi.
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Information System Design
Chapter 4 System Modeling.
Appendix A Object-Oriented Analysis and Design
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Using Diagrams to Represent Program Structure OMT and UML Some pictures and material are from “Design Patterns” by Gamma et al

Outline why diagrams diagram types class diagram elements class aggregation inheritance instantiation class diagram examples object diagram use case diagram state diagram

Why Diagrams diagrams is a way to capture the essential aspects of the program have an overview of the whole program see the important relationships between elements of program get the picture of the program before it is coded standardized as part of object modeling technique (OMT) – Rumbaugh, Blaha, et al 1991 universal modeling language (UML) – Rational Rose Inc. and other companies used in program planning, development and documentation language independent (not necessarily C++)

Diagram Types structure diagram – emphasizes what constructs must be present in the modeled system class diagram – the system classes, attributes, their relationships object diagram – a view of the modeled system at a specific execution instance behavior diagram – emphasizes what actions must happen in the system use-case diagram – system functionality in terms of interaction with outside actors state diagram – program state transitions

Classes Example c: char str: string ClassName oper2(): returnType oper1(parName: parType): rType instVar1: Type instVar2: Type operations – member functions/methods instance variables – member variables/attributes class Example{ public: void showchar(); string getstring(); private: char c; string str; }; Example showchar(): void getstring(): string c: char str: string class BankAccount{ public: void deposit(dollars amount); void withdrawal(dollars amount); private: string owner; dollars balance; };

Aggregation if class contains instances (objects) of other classes the class aggregates them if class aggregates more than one instance of the same class it is shown diagramatically multiplicity - shows how many instances of objects on each side

Inheritance, Reference and Instantiation Class inheritance Inheritance, Reference and Instantiation class contains a reference to another Additional comments object creation (class instantiation) is done by a method of another class

Visibility - private member + public member

Example Class Diagram 1

Example Class Diagram 2

Example Class Diagram 3 blah

Object Diagram shows objects and references as the program is executed what would be a class and an object diagram for an object with dynamically allocated members?

Use Case Diagrams use case actor written description of the system’s behavior regarding tasks or requirements captures interactions between actors (outside entities) and the system through use cases use case actor

State Diagram depicts an object transitions through states what it object state again? notation filled circle – initial state hollow/filled circle – final state rounded rectangle – state top: name of state bottom: activities done in this state arrow – transition label in square brackets – name of the event causing transition need to add forks/joins

Questions on Diagrams What is the purpose for the use of diagrams What is the difference between structure and behavior diagrams? What types of structure diagrams we have studied? Behavior diagrams? How is class denoted on a structure diagram? What is aggregator/agregatee? How is their relationship denoted? What is multiplicity and how is it denoted? What is visibility and hwo is it denoted? How are objects denoted on an a structure diagram? What diagram uses use cases, actors? What is system boundary? What does filled, hollow/filled circle, rectangle, arrows represent in a state diagram?