Object-Oriented Paradigm and UML1 Introduction to the Object- Oriented Paradigm.

Slides:



Advertisements
Similar presentations
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Advertisements

1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
CIT731: Database Development Object Oriented Modeling (OOM)
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
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.
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction To System Analysis and Design
Principles of Object-Oriented Software Development Unified Modeling Language.
Andrew SuttonKent State University1 Software Modeling Andrew Sutton Department of Computer Science Kent State University.
UML and Object Oriented Concepts
Unified Modeling Language(UML) BY
Object-Oriented Analysis and Design
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Introduction to UML 1 Quick Tour Why do we model? What is the UML? Foundation elements Unifying concepts Language architecture Relation to other OMG technologies.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Slide 1 UML Review Chapter 2: Introduction to Object-Oriented Systems Analysis and Design with the Unified Modeling Language, Version 2.0 Alan Dennis,
Unified Modeling Language, Version 2.0
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
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,
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 15 The Unified Modeling Language: a Primer.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 1: Introduction.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Unified Modeling Language Introduction.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
Unified OO becomes commonly used in the late 1980s Various analysis and design methods The “three amigos” join forces in Rational Software Also include.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Basic Characteristics of Object-Oriented Systems
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.
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object Oriented Systems Design
UML Diagrams By Daniel Damaris Novarianto S..
The Movement To Objects
Evolution of UML.
Object-Oriented Analysis and Design
Introduction to the Unified Modeling Language
Systems Analysis and Design With UML 2
University of Central Florida COP 3330 Object Oriented Programming
UML Diagrams Jung Woo.
Introduction to the Unified Modeling Language
Software Design Methodologies and Testing
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:

Object-Oriented Paradigm and UML1 Introduction to the Object- Oriented Paradigm

Object-Oriented Paradigm and UML2 Objectives To explain the essential difference between the procedural and object- oriented (OO) paradigms To summarize the advantages and disadvantages of the OO paradigm To explain the basics concepts of the OO paradigm: objects, classes, attributes, and operations

Object-Oriented Paradigm and UML3 The Procedural Paradigm Operations are separate from data but manipulate it. Example: A stack data type –Data store (array, linked list) –Separate operations for pushing, popping, etc.

Object-Oriented Paradigm and UML4 The Object-Oriented Paradigm Data is packaged (encapsulated) with the operations that manipulate it. Example: a stack object –Data store within a stack object –Operations within the stack object

Object-Oriented Paradigm and UML5 Encapsulation Advantages 1 Problem and solution similarity— Software objects are like real-world things. Abstraction—Data structures and algorithm details are ignored in design. Information hiding—Implementations can be truly hidden. (Shielding the internal details of a program unit’s processing from other program units)

Object-Oriented Paradigm and UML6 Encapsulation Advantages 2 Coupling—Operations are not related through shared data structures. (The degree of connection between pairs of modules) Cohesion—It’s easier to keep related operations and data together. (The degree to which a module’s parts are related to one another)

Object-Oriented Paradigm and UML7 Encapsulation Advantages 3 Reusability—It’s easier to reuse objects than collections of operations and various data structures. Scalability—Objects can be of arbitrary size. New features—The object-oriented paradigm offers new and powerful ways of doing things, as we will see.

Object-Oriented Paradigm and UML8 Problems with the OO Paradigm It’s a lot more complicated than the procedural paradigm. –Harder to learn –Harder to use properly

Object-Oriented Paradigm and UML9 Objects An object is an entity that has properties and exhibits behavior. Things are encapsulated when they are packaged together in a container. Objects encapsulate properties and behavior. Ideally, objects model things in the world. –Example: Traffic simulation

Object-Oriented Paradigm and UML10 Attributes and Operations An attribute is a named data value held by an object or a class. An operation is a named object or class behavior. A feature is an attribute or operation. An attribute is a named data value held by an object or a class. An operation is a named object or class behavior. A feature is an attribute or operation.

Object-Oriented Paradigm and UML11 Attribute and Operation Examples

Object-Oriented Paradigm and UML12 Object Characteristics Every object has its own attributes and operations, though these may be the same as some other objects. Every object has a unique identity. –Two objects with the same attributes holding the same values and behaviors are distinct.

Object-Oriented Paradigm and UML13 Messages Objects communicate by sending one another messages. Messages are abstractions of function calls, signals, exceptions, etc. Ideally, objects send messages that model real-world communications between things. –Example: Traffic simulation

Object-Oriented Paradigm and UML14 Classes Classes have attributes and operations. A class is not a set of objects—it is more like a blueprint or a specification. Objects are said to be instances of classes. An class is an abstraction of a set of objects with common attributes and operations.

Object-Oriented Paradigm and UML15 Examples of Classes

Object-Oriented Paradigm and UML16 Classes and Abstract Data Types ADT: a set of values (the carrier set) and a collection of operations to manipulate them A class forms a type but not an ADT Mathematical entities that can be implemented procedurally or using the OO paradigm OO techniques provide an excellent way to implement ADTs

Object-Oriented Paradigm and UML17 UML Class and Object Diagrams

Object-Oriented Paradigm and UML18 UML Unified Modeling Language Developed by Grady Booch, Ivar Jacobson, and James Rumbaugh (the three amigos) at Rational Software Corporation (1994) –Goal to produce a standard OO analysis and design notation Now a standard controlled by the Object Management Group (OMG)

Object-Oriented Paradigm and UML19 UMLUML Names A name in UML is character string that identifies a model element. –Simple name: sequence of letters, digits, or punctuation characters –Composite name: sequence of simple names separated by the double colon (::) Examples –Java::util::Vector –veryLongNameWithoutPunctuationCharacters –short_name

Object-Oriented Paradigm and UML20 UML Class Symbol

Object-Oriented Paradigm and UML21 Attribute Specification Format name : type [ multiplicity ] = initial-value name—simple name, cannot be suppressed type—any string, may be suppressed with the : multiplicity—number of values stored in attribute –list of ranges of the form n..k, such that n <=k –k may be * –n..n is the same as n –0..* is the same as * –1 by default –if suppressed, square brackets are omitted initial-value—any string, may be suppressed along with the =

Object-Oriented Paradigm and UML22 Examples weight weight : real = 40.0 signal[*] : real = { 0.0 } charge[3,5,7..10] hour = 12

Object-Oriented Paradigm and UML23 Operation Specification Format name( parameter-list ) : return-type-list name—simple name, cannot be suppressed parameter-list –direction param-name : param-type = default-value –direction—in, out, inout, return; in when suppressed –param-name—simple name; cannot be suppressed –param-type—any string; cannot be suppressed –default-value—any string; if suppressed, so is = return-type-list—any comma-separated list of strings; if omitted (with :) indicates no return value The parameter-list and return-type-list may be suppressed together.

Object-Oriented Paradigm and UML24 Examples rotate() rotate( degrees : real ) rotate( in degrees : real = 0.0 ) : Boolean rotate( inout degrees : real ) print( s : String[*] ) : void split( s : String ) : int, String[*]

Object-Oriented Paradigm and UML25 Attribute and Operation Examples

Object-Oriented Paradigm and UML26 Class Diagram Uses Central static modeling tool in object- oriented design Can be used throughout both the product and engineering design processes

Object-Oriented Paradigm and UML27 Object Diagrams Object diagrams are used much less often than class diagrams. Object symbols have only two compartments: –Object name –Attributes (may be suppressed)

Object-Oriented Paradigm and UML28 Object Name Format object-name—simple name class-name—a name (simple or composite) stateList—list of strings; if suppressed, the square brackets are omitted The object-name and class-name may both be suppressed, but not simultaneously. object-name : class-name [ stateList ]

Object-Oriented Paradigm and UML29 Object Attribute Format attribute-name—simple name value—any string Any attribute and its current value may be suppressed together. attribute-name = value

Object-Oriented Paradigm and UML30 Examples of Object Symbols

Object-Oriented Paradigm and UML31 Object Diagram Uses Show the state of one or more objects at a moment during execution Dynamic models as opposed to class diagrams, which are static models (A static model represents aspects of a program that do not change during execution.) (A dynamic model represents aspects of a program that change during execution.)

Object-Oriented Paradigm and UML32 UML Diagram Tree Diagram Structure Diagram Class Diagram Component Diagram Composite Structure Diagram Deployment Diagram Object Diagram Package Diagram Behavior Diagram Interaction Diagram Sequence Diagram Communication Diagram Interaction Overview Diagram Timing Diagram Activity Diagram Use Case Diagram State Machine Diagram

Object-Oriented Paradigm and UML33 Procedural vs. Object-Oriented Thinking

Object-Oriented Paradigm and UML34 Stack of int ADT Carrier set: set of all stacks of ints –Empty stack –#0, #1, #2, … –#00, #01, #10, … –… Operations: push(), pop(), top(), isEmpty(), isFull(), …

Object-Oriented Paradigm and UML35 Procedural Approach Determine a way to represent the elements of the carrier set (a data structure) Determine how to implement the operations (procedures) Implement the data structure and procedures in code

Object-Oriented Paradigm and UML36 C stackOfInt Implementation stackOfInt.h stackOfInt.c main.c

Object-Oriented Paradigm and UML37 Object-Oriented Approach Encapsulate the carrier set and the operations in a class Determine how to implement the carrier set and operations Implement the class in code

Object-Oriented Paradigm and UML38 Class Design

Object-Oriented Paradigm and UML39 C++ IntStack Implementation IntStack.h IntStack.cpp main.c

Object-Oriented Paradigm and UML40 Example: Ph Monitor pH sensors in a vat are monitored A control chart is generated

Object-Oriented Paradigm and UML41 Procedural Approach Make a context diagram Make data flow diagrams Make ERDs Make a structure chart Implement the code

Object-Oriented Paradigm and UML42 pH Monitor Context Diagram

Object-Oriented Paradigm and UML43 pH Monitor Data Flow Diagram

Object-Oriented Paradigm and UML44 pH Monitor Structure Chart

Object-Oriented Paradigm and UML45 How to describe Requirement Result on OO? Use UML diagram Sometime you can use Use Case diagram as the first diagram. Move into another diagram as needed.

Object-Oriented Paradigm and UML46 Use Case Diagram Change Chart Display Chart Collect Sample

Object-Oriented Paradigm and UML47 pH Monitor Class Diagram

Object-Oriented Paradigm and UML48 Thank you