1 Systems Analysis & Design Object Modeling IS 431: Lecture 6 CSUN Information Systems

Slides:



Advertisements
Similar presentations
An Introduction to Object Modeling
Advertisements

Karolina Muszyńska Based on:
Chapters 7 & 9 System Scope
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Object-oriented modeling Class/Object Diagrams
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Object-Oriented Analysis and Design
Department of Computing
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
Systems Analysis and Design in a Changing World, Fourth Edition
Object-oriented analysis (OOA) techniques are used to (1) study existing objects to see if they can be reused or adapted for new uses, and (2) define new.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
Unified Modeling Language
Object-Oriented Analysis and Design
Chapter 7: The Object-Oriented Approach to Requirements
Building The Analysis Model. Object-Oriented Analysis The object oriented analysis define all classes, the relationships and behavior associated with.
Karolina Muszyńska Based on: G. Schneider, J.P. Winters „Stosowanie przypadków użycia” S. Wrycza, B.
Chapter 5: Modeling Systems Requirements: Events and Things
CMIS 470 Structured Systems Design
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 7 Structuring System Process Requirements
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 8 Slide 1 Chapter 9 Structuring System Data Requirements.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
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.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Unified Modeling Language, Version 2.0
5 Systems Analysis and Design in a Changing World, Fourth Edition.
The Object-Oriented Approach to Requirements
4 2009/10 Object Oriented Technology 1 Topic 4: The Object-Oriented Approach to Requirements Adopted from: Ch.7 The Object-Oriented Approach to Requirements.
Systems Analysis and Design in a Changing World, Fifth Edition
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis & Design 7 th Edition Chapter 5.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
5 Systems Analysis and Design in a Changing World, Fifth Edition.
Systems Analysis and Design in a Changing World, 6th Edition
Introduction to Object Modeling
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Systems Analysis and Design in a Changing World, Fourth Edition
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Basic Characteristics of Object-Oriented Systems
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
Systems Analysis and Design in a Changing World, Fourth Edition
Appendix 3 Object-Oriented Analysis and Design
Business System Development
DATA REQIREMENT ANALYSIS
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Systems Analysis and Design
Object-Oriented Analysis and Design
Unified Modeling Language
Object-Oriented Systems Analysis and Design Using UML
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

1 Systems Analysis & Design Object Modeling IS 431: Lecture 6 CSUN Information Systems

IS 431 : Lecture 6 2 Object Modeling Why Object Modeling ? Object Concepts –Class/Object, Attribute, Behavior, Inheritance, Encapsulation, Message, Polymorphism UML Diagrams for Object-Oriented Analysis –Use Case Diagram –Class/Object Diagrams –Sequence Diagram –Statechart Diagram

IS 431 : Lecture 6 3 Object Modeling Object-oriented analysis (OOA) techniques are used to (1) study existing objects to see if they can be reused or adapted for new uses, and (2) define new or modified objects that will be combined with existing objects into a useful business computing application. Object modeling is a technique for identifying objects within the systems environment and the relationships between those objects. The Unified Modeling Language (UML) is a set of modeling conventions (notations) to specify or describe a software system in terms of objects.

IS 431 : Lecture 6 4 Object Modeling Benefits: –Break a complex system into manageable components –Create reusable components can be plugged into other systems or use them as starting points for other projects –“Object-think” is more realistic !!!

IS 431 : Lecture 6 5 Object Concepts An object is something that is or is capable of being seen, touched, or otherwise sensed, and about which users store data and associate behavior. A class is a set of objects that share common attributes and behavior. A class is also referred to as an object class. Attributes are the data that represent characteristics of interest about an object. An instance (or object instance) of an object consists of the values for the attributes that describe a specific person, place, thing, or event.

IS 431 : Lecture 6 6 Classes, Objects, Attributes, & Instances Customer custNo lastName firstName phone street city state changeAddress() Doe:Customer custNo:123 lastName:Doe firstName:Joe phone: street:AnyStreet city:AnyCity state:AnyState changeAddress() Green:Customer custNo:234 lastName:Green firstName:Mary phone: street:OtherStreet city:OtherCity state:OtherState changeAddress()

IS 431 : Lecture 6 7 Object Concepts … Behavior (method, service) refers to those activities that the object can do and which correspond to functions that act on the object’s data (or attributes). Encapsulation is the packaging of data and method together. It shields the internal working of the object from the changes in the outside system. It keeps the system from being affected when changes are made to objects. It is the key to reusability. –All an object needs to know is the set of methods that other objects can perform and what message need to be sent to trigger them.

IS 431 : Lecture 6 8 Common Methods Constructor to create a new instance of a class Query to access and get info about the state of an object but does not alter the state Update to alter the state of an object and change the value of its attribute(s).

IS 431 : Lecture 6 9 Supertypes & Subtypes A class supertype is an object class whose instances store attributes that are common to one or more class subtypes of the object. A class subtype is an object class whose instances inherit some common attributes from a class supertype, and then add other attributes that are unique to an instance of the subtype. Inheritance means that methods and/or attributes defined in an object class (superclass) can be inherited or reused by another object classes (subclasses).

IS 431 : Lecture 6 10 Generalization Specialization Employee Name DOB SSN DateHire CalSeniority() Executive Position Location DateAppoint Salary Update() Foreperson Factory Station DateAppoint Wage Rate Update() Worker Factory Station Machine Wage Rate Insert ()

IS 431 : Lecture 6 11 Object Concepts … Message is the information passed when one object invokes one or more of another object's methods (behaviors) to request information or some action (It is function calling in programming) Customer Order OrderNo OrderDate OrderStatus add() change() displayStatus() displayStatus(123)

IS 431 : Lecture 6 12 Object Concepts … Polymorphism means “many forms.” In object- oriented techniques, it means that the same message can be interpreted (and a behavior may be completed) differently by different objects/classes. Methods of the same name in different classes. Methods of the same name (but different parameters) in the same class Insert(customer) is different from insert(inventory-item) as different info need to be collected and stored.

IS 431 : Lecture 6 13 Object-Oriented Analysis with UML Diagrams  Modeling the functions of the system (with a use case diagram).  Modeling the objects within the scope of the system and their relationships (with class and object diagrams for each use case, and then for the integrated system).  Modeling the interactions between objects to complete a function/use case (with a sequence diagram for each use case).  Modeling the behavior / logic of the objects (with a statechart diagram for each complex class).

IS 431 : Lecture 6 14 UML Diagrams Enter New Customer Create New Order :customer:order Create Order CREATE SIPMENTCREATE ORDER ORDER CUSTOMER SHIPMENT USE CASE DIAGRAMCLASS DIAGRAM FOR USE CASE “Create New Order” SEQUENCE DIAGRAM FOR USE CASE “ Create New Order ” STATECHART DIAGRAM FOR OBJECT “Order” Order Clerk :shipment Create Shipment

IS 431 : Lecture 6 15 Use Case Modeling Use case modeling is the process of modeling a system ’ s functions in terms of business events, who initiated the events, and how the system responds to the events. A use case is a complete sequence of related actions (a scenario), both automated and manual, for the purpose of completing a business function: What the system must do. An actor represents an external entity that needs to interact with the system to exchange information. An actor is a user, a role, which could be an external system as well as a person. A temporal event is a system event that is triggered by time. (The actor of a temporal event use case is time.)

IS 431 : Lecture 6 16 USE CASE DIAGRAM Use Case Diagram is a functional description (use cases, actors) of the entire system: functions being supported by the system Use Case Diagram is similar to Context Diagram + Level-O DFD in traditional structured technique:  An individual Use Case appears more like a DFD fragment as it identifies an individual function (major process)  In Use Case Diagram, an actor is the one who actually interacts with the system, whether that actor is the original source of information or not (in DFD, an external agent is always the source or destination of info and may not necessarily be the one interacting with the system.)  Use Case Diagram does NOT indicate data flows or flows of information in and out the system (they are identified later in interaction diagrams)

IS 431 : Lecture 6 17 A Use Case Diagram

IS 431 : Lecture 6 18 Extension and Abstract Use Cases An extension use case extends the functionality of an original use case to add new behaviors or actions to the basic course. An extension use case can only be invoked by the use case it is extending. An abstract use case contains typical course steps that were common to two or more original use cases. An abstract use case reduces redundancy and promotes reuse.

IS 431 : Lecture 6 19 Extension Use Cases (“extend” relationship) > Class registration Registration for special classes Insufficient prerequisites “Class registration” is the basic course of actions. On special occasions, “Registration for special classes” and/or “Insufficient prerequisites” will be invoked. Special cases add new data/behaviors to the normal case.

IS 431 : Lecture 6 20 Abstract Use Cases (“use” or “include” relationship) > Track sales & inventory Reorder supplies Generate reports “Reorder Supplies” uses “Track sales & inventory” “Generate reports” uses “Track sales & inventory. In programming, it is a common subroutine.

IS 431 : Lecture 6 21 Building a Use Case Diagram Identify use cases (major system functions) Identify the system boundary Identify associations between use cases (“extends”, “includes”) for special cases or common subroutines Identify actors (look at the sources and destinations of major inputs and outputs)

IS 431 : Lecture 6 22 CLASS / OBJECT DIAGRAMS Class: a set of objects sharing a common structure and a common behavior (Student). Class Diagram: showing the static structure of OO model: classes, their internal structure, and the relationships. Object Diagram: showing the graphs of object instances (class members) of a given class diagram: Marie:student (identified object) or :student (unidentified object).

IS 431 : Lecture 6 23 A Class Diagram

IS 431 : Lecture 6 24 Object/Class Relationships An object/class relationship is an association that exists between one or more objects/classes. It is defined by business rules and/or common practices. Multiplicity defines how many instances of one object/class can be associated with one instance of another object/class. (It is Cardinality in ERD !!!) 0..* CustomerOrder places

IS 431 : Lecture 6 25 UML Multiplicity Notations

IS 431 : Lecture 6 26 Aggregation Relationship Operation Team DoctorNurseAdmin staff “is a part of”, “is made of” relationships

IS 431 : Lecture 6 27 Generalization Relationship Employee DoctorNurseAdmin staff -“is a kind of” relationships - Showing inheritance (type/subtypes)

IS 431 : Lecture 6 28 Building a Class Diagram Identify related classes. A class diagram show the classes that are needed for one particular use case, (not for the whole system as in integrated class diagram). Identify attributes and operations. List only peculiar, special methods (calculateTax) of the class, not the implicit methods (insert). Identify relationships and multiplicity between classes. Make use of generalization and aggregation relationships if possible.

IS 431 : Lecture 6 29 SEQUENCE DIAGRAM A Sequence Diagram depicts the interactions among objects of a use case during a certain period of time. It gives an external view of object behaviors. A sequence diagram represents a specific set of messages (function calls) and interchanges between objects. Thus, objects are indicated on the diagram instead of classes. Each actor and object has a lifeline (from top to bottom) that shows the sequence of message. The activation lifeline shows time period during which the object perform an operation. The “X” mark at the end of the activation line indicate the point at which the object ceases to exist in the system.

IS 431 : Lecture 6 30 SEQUENCE DIAGRAM … A message symbol in a sequence diagram has 2 parts: A directional arrow A message descriptor in the form of: [true/false condition] return-value:= message-name (arguments) Sometimes, one can use a return arrow if the return value is not very important

IS 431 : Lecture 6 31 A Sequence Diagram Template for a Use Case Actor :object 1:object 2 message 1 message 2 message 3

IS 431 : Lecture 6 32 :product :order:orderedProduct:order- Clerk :member display member information validate item create item enter item (product number) select new order update address (address) verify member (member number) A Sequence Diagram

IS 431 : Lecture 6 33 Building a Sequence Diagram Identify objects and the sequence that these objects interact with each other in each use case. Identify message (function call) and the sequence Draw lifeline and activation boxes (how long we want to keep the class/program active in the system)

IS 431 : Lecture 6 34 STATECHART DIAGRAM A Statechart Diagram describes the internal working of an object when it receives a message. Each class in the class diagram for a system has its own unique state diagram. An object comes into existence within the system in some manner. During its existence, it is in certain states, and makes transitions from states to states. An object remains in a state until some event causes it to move to another state.

IS 431 : Lecture 6 35 STATECHART DIAGRAM A state for an object is a situation during its life when it satisfies some condition, performs some activity, or waits for some event. (A set of values that describe an object at a specific point in time) An event is something that takes place at a certain point in time and changes value(s) of an object, (which in turn changes the object’s state). Transition is the mechanism that causes an object to leave a state and change to a new state.

IS 431 : Lecture 6 36 A Statechart Diagram Template for an Object State 1 Internal Trans State 2 Internal Trans State 3 Internal Trans Init state Final state Event 1 Trans 1 Trans 3 Trans 2 Event 2

IS 431 : Lecture 6 37 A Statechart Diagram

IS 431 : Lecture 6 38 Building a Statechart Diagram Examine the class diagram and identify which classes must undergo a complex series of state changes and build a statechart diagram for each of them (classes). Identify the various states that an object will have over its life time Determine what causes each state to occur (change)