content analysis

genjutsu980
SYAD-Week6ObjectModeling.pptx

Chapter 6: Object Modeling

Kent Institute Australia Pty. Ltd.

ABN 49 003 577 302 CRICOS Code: 00161E RTO Code: 90458 TEQSA Provider Number: PRV12051

Version 2 – 18th December 2015

1

Prescribed Text and recommended readings

Prescribed text

Rosenblatt, H. J. (2016), Systems Analysis and Design.11th Edition, Cengage Learning, Boston MA

Prescribed reading

Robertson, S. and Robertson, J. (2013), Mastering the Requirements Process: Getting Requirements Right, 3rd Edition, Addison Wesley, Upper Saddle River, NJ

IIBA (2015), Guide to the Business Analysis Body of Knowledge, BABOK Version 3.0, International Institute of Business Analysis, http://www.iiba.org/BABOKGuide.aspx

2

2

Learning Objectives

Explain how object-oriented analysis can be used to describe an information system

Define object modeling terms and concepts, including objects, attributes, methods, messages, classes, and instances

Explain relationships among objects and the concept of inheritance

Draw an object relationship diagram

3

Learning Objectives (cont.…)

Describe Unified Modeling Language (UML) tools and techniques including use cases, use case diagrams, class diagrams, sequence diagrams, state transition diagrams, and activity diagrams

Explain the advantages of using CASE tools in developing the object model

Explain how to organize an object model

4

5

Overview of Object-Oriented Analysis (Cont.1)

Object-Oriented Terms and Concepts

Unified modeling language (UML)

Method of visualizing and documenting an information system

Attributes: Characteristics that describe an object

Methods: Tasks or functions that the object performs

Message: Command to perform a specific function

A class is a group of similar objects

Instance: Specific member of a class

5

Objects

Represented as a rectangle

The object name is at the top, followed by the object’s attributes and methods

6

Overview of Object-Oriented Analysis (Cont.2)

FIGURE 6-1 Objects have attributes, can send and receive messages, and perform actions called methods.

6

7

Overview of Object-Oriented Analysis (Cont.3)

FIGURE 6-2 The PARENT object includes four attributes and two methods. Mary Smith, Ahmed Ali, and Anthony Greene are instances of the PARENT object.

8

Overview of Object-Oriented Analysis (Cont.4)

FIGURE 6-3 The CHILD object includes five attributes and five methods. James Smith, Amelia Ali, and Misty Greene are instances of the CHILD object.

8

Attributes

Describe the characteristics of an object

The number of attributes required depends on:

Business requirements of the information system

Requirements of users

Attributes of an object are defined during the system development process

Objects possess a state

State: Describes the object’s current status

9

Overview of Object-Oriented Analysis (Cont.5)

9

Methods

Specific tasks that an object can perform

Identify functions performed

Describe the functions performed

10

Overview of Object-Oriented Analysis (Cont.6)

FIGURE 6-4 The MORE FRIES method requires the server to perform seven specific steps.

10

Message

A command that tells an object to perform a certain method

Polymorphism: Concept that a message gives different meanings to different objects

11

Overview of Object-Oriented Analysis (Cont.7)

FIGURE 6-5 In an example of polymorphism, the message GOOD NIGHT produces different results, depending on which object receives it.

11

Message (cont.)

A message to the object triggers changes within the object without specifying how the changes must be carried out

An object can be viewed as black box

Encapsulation: Idea that all data and methods are self-contained, as in a black box

12

Overview of Object-Oriented Analysis (Cont.8)

Figure 6-6 In a school information system, an INSTRUCTOR object sends an ENTER GRADE message to an instance of the STUDENT RECORD class.

Classes

An object belongs to a group or category called a class

All objects within a class share common attributes and methods

Subclasses: Categories within a class

Super-class: A class belonging to a general category

13

Overview of Object-Oriented Analysis (Cont.9)

13

14

Overview of Object-Oriented Analysis (Cont.10)

FIGURE 6-7 The VEHICLE class includes common attributes and methods. CAR, TRUCK, MINIVAN, and SCHOOL BUS are instances of the VEHICLE class.

14

15

Overview of Object-Oriented Analysis (Cont.11)

FIGURE 6-9 At the fitness center, the PERSON superclass includes common attributes and methods. EMPLOYEE is a class within the PERSON superclass. INSTRUCTOR is a subclass within the EMPLOYEE class.

15

16

Relationships Among Objects and Classes

Relationships

Enable objects to communicate and interact as they perform business functions and transactions

Describe what objects need to know about each other

Inheritance

The strongest relationship

Enables an object to derive one or more of its attributes from another object

16

17

Relationships Among Objects and Classes (Cont.1)

FIGURE 6-10 An inheritance relationship exists between the INSTRUCTOR and EMPLOYEE objects. The INSTRUCTOR (child) object inherits characteristics from the EMPLOYEE (parent) class and can have additional attributes of its own.

17

Object Relationship Diagram

Displays objects and how they interact to perform business functions and transactions

18

Relationships Among Objects and Classes (Cont.2)

FIGURE 6-11 Object relationship diagram for the fitness center.

18

19

Object Modeling with the Unified Modeling Language

UML uses a set of symbols to represent graphically the various components and relationships within a system

Use Case Modeling

Use case: Represents the steps in a specific business function or process

An external entity, called an actor, initiates a use case by requesting the system to perform a function or process

19

20

Object Modeling with the Unified Modeling Language (Cont.1)

Use Case Modeling (Cont.)

UML symbol for a use case is an oval with a label that describes the action or event

The actor is shown as a stick figure, with a label that identifies the actor’s role

Use case description: Documents the name of the use case, the actor, a description of the use case

Provides a step-by-step list of the tasks and other key descriptions and assumptions

FIGURE 6-12 In a medical office system, a PATIENT

(actor) can MAKE APPOINTMENT (use case).

Use case description: Documents the name of the use case, the actor, a description of the use case, a step-by-step list of the tasks required for successful completion, and other key descriptions and assumptions

20

21

Object Modeling with the Unified Modeling Language (Cont.2)

FIGURE 6-13 When a student adds a class, PRODUCE FITNESS-CLASS ROSTER uses the results of ADD CLASS to generate a new class roster. When an instructor changes his or her availability, UPDATE INSTRUCTOR INFORMATION uses the CHANGE AVAILABILITY use case to update the instructor’s information.

21

22

Object Modeling with the Unified Modeling Language (Cont.3)

FIGURE 6-14 The ADD NEW STUDENT use case description documents the process used to add a current student into an existing class.

22

Use Case Diagrams

A visual summary of several related use cases within a system or subsystem

The first step is to identify the system boundary which is represented by a rectangle

System boundary: Shows what is included in the system (inside the rectangle) and what is not included in the system (outside the rectangle)

23

Object Modeling with the Unified Modeling Language (Cont.4)

23

24

Object Modeling with the Unified Modeling Language (Cont.5)

FIGURE 6-16 A use case diagram to handle work at an auto service department.

24

Class Diagrams

Show the object classes and relationships involved in a use case

Each class appears as a rectangle, with the class name at the top, followed by the class’s attributes and methods

Lines show relationships between classes and have labels identifying the action that relates the two classes

Includes a concept called cardinality

Cardinality: Describes how instances of one class relate to instances of another class

25

Object Modeling with the Unified Modeling Language (Cont.6)

25

26

Object Modeling with the Unified Modeling Language (Cont.7)

FIGURE 6-17 Examples of UML notations that indicate the nature of the relationship between instances of one class and instances of another class.

26

27

Object Modeling with the Unified Modeling Language (Cont.8)

FIGURE 6-18 Class diagram for a sales order use case (attributes and methods omitted for clarity).

27

Sequence Diagrams

Dynamic model of a use case, showing the interaction among classes during a specified time period

Graphically document the use case by showing the classes, the messages, and the timing of the messages

Include symbols that represent classes, lifelines, messages, and focuses

28

Object Modeling with the Unified Modeling Language (Cont.9)

28

Sequence Diagrams (Cont.)

Classes

Send or receive messages

Shown at the top of the sequence diagram

Lifelines

Represent the time during which the object above it is able to interact with the other objects in the use case

An X marks the end of the lifeline

Messages

Include additional information about the contents

Focuses

Indicate when an object sends or receives message

29

Object Modeling with the Unified Modeling Language (Cont.10)

29

30

Object Modeling with the Unified Modeling Language (Cont.11)

FIGURE 6-19 A sequence diagram with two classes. Notice the X that indicates the end of the CLASS 2 lifeline. Also notice that each message is represented by a line with a label that describes the message, and that each class has a focus that shows the period when messages are sent or received

Copyright ©2017 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

30

31

Object Modeling with the Unified Modeling Language (Cont.12)

FIGURE 6-20 The sequence diagram for the ADD NEW STUDENT use case. The use case description for ADD NEW STUDENT is shown in Figure 6 14.

Copyright ©2017 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

31

State Transition Diagrams

Show how an object changes from one state to another, depending on events that affect the object

All possible states must be documented in the state transition diagram

States appear as rounded rectangles with the state names inside

32

Object Modeling with the Unified Modeling Language (Cont.13)

FIGURE 6-21 An example of a state transition diagram for a bank account.

Copyright ©2017 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.

32

Activity Diagrams

Show actions and events as they occur

Show the order in which the actions take place and identify the outcomes

33

Object Modeling with the Unified Modeling Language (Cont.14)

FIGURE 6-22 An activity diagram shows the actions and events involved in withdrawing cash from an ATM.

33

Business Process Modeling (BPM)

Represents the people, events, and interaction in a system

Can be used anytime during the systems development process

Compatible with object modeling

34

Object Modeling with the Unified Modeling Language (Cont.15)

34

35

Object Modeling with the Unified Modeling Language (Cont.16)

FIGURE 6-23 The Bizagi Modeler tool supports business modeling and simulation using the standard BPM notation.

Source: bizagi.com

35

CASE Tools

Provide an overall framework for documenting the system components

Object modeling requires many types of diagrams to represent proposed systems

CASE tools speed up the process

Ensure consistency and provide common links

Once objects are described and used in one part of the design, they can be reused multiple times without further effort

36

Object Modeling with the Unified Modeling Language (Cont.)

36

37

Organizing the Object Model

Develop an object relationship diagram that provides an overview of the system

Support each diagram or object definition with clear and relevant documentation that can be accessed easily

Organize use cases and use case diagrams so they can be linked to the appropriate class, state transition, sequence, and activity diagrams

Maintain accuracy

37

38

Chapter Summary

Object modeling is a popular technique that describes a system in terms of objects

Object-oriented terms include classes, attributes, instances, messages, and methods

Objects can send messages, or commands, that require other objects to perform certain methods, or tasks

38

The Unified Modeling Language (UML) is a widely used method of visualizing and documenting an information system

Use case describes a business situation initiated by an actor, who interacts with the information system

At the end of the object modeling process, the use cases and use case diagrams are organized and class, sequence, state transition, and activity diagrams are created

39

Chapter Summary (Cont.)

39

kent.edu.au Kent Institute Australia Pty. Ltd. ABN 49 003 577 302 ● CRICOS Code: 00161E ● RTO Code: 90458 ● TEQSA Provider Number: PRV12051

40

40