Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 6 OBJECT ANALYSIS.

Similar presentations


Presentation on theme: "CHAPTER 6 OBJECT ANALYSIS."— Presentation transcript:

1 CHAPTER 6 OBJECT ANALYSIS

2 Chapter 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 Chapter Objectives 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 Introduction You learn about object-oriented analysis, which is another way to view and model system requirements You use object-oriented methods to document, analyze, and model the information system

5 Overview of Object-Oriented Analysis
Object-oriented (O-O)- analysis describes an information system by identifying things called objects. Object- represents a real person, place, event, or transaction Object-oriented analysis is a popular approach that sees a system from the viewpoint of the objects themselves as they function and interact End product of object oriented analysis is an Object model-represent the information system in terms of objects and object-oriented concepts.

6 Object-Oriented Terms and Concepts
Unified Modeling Language (UML)-widely used method of visualizing and documenting an information system. An objects has: Attributes Methods Message Class Instance-is a specific member of a class

7

8 The PARENT object includes four attributes and two methods
Objects The PARENT object includes four attributes and two methods

9 Objects The CHILD object includes five attributes and five methods

10 Objects The DOG object includes six attributes and four methods

11 Objects The STUDENT object includes seven attributes and six methods
The INSTRUCTOR object includes eight attributes and six methods

12 Attributes characteristics that describe the object
If objects are similar to nouns, attributes are similar to adjectives that describe the characteristics of an object Some objects might have a few attributes; others might have dozens Object can have a specific attribute called a State

13 A method defines specific tasks that an object can perform
Methods A method defines specific tasks that an object can perform Just as objects are similar to nouns and attributes are similar to adjectives, methods resemble verbs that describe what and how an object does something The MORE FRIES method requires the server to perform seven specific steps

14 Messages Is a command that tells an object to perform certain method Polymorphism-concept that message gives different meanings to different objects Black box-message to the object triggers changes within the object without specifying how the changes must be carried out Black box is an example of Encapsulation-all data and methods are self contained

15 Message: ADD FITNESS-CLASS
Tells the STUDENT class to perform all the steps needed to add fitness class instance

16 An example of polymorphism, the message GOOD NIGHT produces different results, depending on which object receives it

17 Messages A major advantage of O-O designs is that systems analysts can save time and avoid errors by using modular objects, and programmers can translate the designs into code, working with reusable program modules that have been tested and verified An INSTRUCTOR object sends an ENTER GRADE message to an instance of the STUDENT RECORD class

18 Classes An object belongs to a group or category called a class
All objects within a class share common attributes and methods Object witin a class can be grouped into Subclasses Superclass

19 Classes The VEHICLE class includes common attributes and methods
CAR,TRUCK,MINIVAN and SCHOOL BUS are instances of the VEHICLE class

20 Relationships Among Objects and Classes
Relationship enable objects to communicate and interact as they perform business functions and transactions required by the system. Relationships describe what objects need to know about each other, how objects respond to change in other objects and the effects of membership in classes, superclasses and subclasses Inheritance-the strongest relationship Enable Child to derive one or more of its attributes from another object, called aParent

21 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

22 Relationships Among Objects and Classes
Object Relationship Diagram Provide overview of the system Model shows he objects and how they interact to perform business functions and transaction

23 Object Modeling with the Unified Modeling Language
The UML uses a set of symbols to represent graphically the various components and relationships within a system It mainly is used to support object-oriented systems analysis and to develop object models

24 Use Case Modeling Use case represents the steps in a specific business function or process Actor (external entity)- initiates a use case by requesting the system to perform a function or process Symbol for a use case is an oval with a label that describes the action or event Use cases also can interact with other use cases

25 Use Case Modeling When the outcome of one use case is incorporated by another use case, we say that the second case uses the first case Use case description- When you identify use cases, try to group all the related transactions into a single use case

26 Use Case Diagrams Use case diagram-visual summary of several related use cases within a system or subsystem System boundary-what is included in the system After you identify the system boundary, you place the use cases on the diagram, add the actors, and show the relationships

27 Class Diagrams Class Diagram-shows the object classes and relationships involved in a use case Evolves into a physical model and finally becomes a functioning information system Each class appears as a rectangle, with the class name at the top, followed by the class’s attributes and methods Cardinality-describes how instances of one class relate to instances of another class

28 Class Diagrams

29 Nature of the relationship
Examples of UML notations that indicate the nature of the relationship between instances of one class and instances of another class UML notation Nature of the relationship Example Description 0..* Zero or many An employee can have no payroll deductions or many deductions 0..1 Zero or one An employee can have no spouse or one spouse 1 One and only one An office manager manages one and only one office 1..* One or many One order an include one or many items ordered Employee Payroll Deduction 1 0..* Employee Spouse 1 0..1 Office Manager Sales Office 1 1 Item Ordered Order 1 1..*

30 Sequence Diagrams Sequence diagram- showing the interaction among classes during a specified time period Include symbols that represent Classes-classes that send or receive messages Lifelines-represent the time Messages- Focuses-indicates when object sends or receives a message

31 FITNESS CLASS SCHEDULE
STUDENT MANAGER FITNESS CLASS SCHEDULE REGISTRATION RECORD request fitness class Check Notify Pay Register X The sequence diagram for the ADD NEW STUDENT use case

32 State Transition Diagrams
Shows how an object changes from one state o another, depending n events that effect the object The small circle to the left is the initial state, or the point where the object first interacts with the system Reading from left to right, the lines show direction and describe the action or event that causes a transition from one state to another The circle at the right with a hollow border is the final state

33 State Transition Diagrams
Example of a state transition diagram for bank account

34 Activity Diagrams Activity diagram- resembles a horizontal flowchart that shows the actions and events as they occur Show the order in which the actions take place and identify the outcome Sequence diagrams, state transition diagrams, and activity diagrams are dynamic modeling tools that can help a systems analyst understand how objects behave and interact with the system

35 Activity Diagrams Activity diagram shows the actions and events involved in withdrawing cash from an ATM machine

36 CASE Tools Object modeling requires many types of diagrams to represent the proposed system Creating the diagrams by hand is time-consuming and tedious, so systems analysts rely on CASE tools to speed up the process and provide an overall framework for documenting the system components

37 Organizing the Object Model
You should develop an object relationship diagram that provides an overview of the system You should organize your use cases and use case diagrams so they can be linked to the appropriate class, state transition, sequence, and activity diagrams It is much easier to repair a diagram now than to change the software later

38 Chapter Summary This chapter introduces object modeling, which is a popular technique that describes a system in terms of objects The Unified Modeling Language (UML) is a widely used method of visualizing and documenting an information system At the end of the object modeling process, you organize your use cases and use case diagrams and create class, sequence, state transition, and activity diagrams

39 Review questions What is object oriented analysis? Define an object and give an example. Define an attribute and give an example. Define a method and give an example. Define a use case and use case diagram.

40 Apply your knowledge Ipoh Community College has a typical school registration process. Student support services include faculty advisors and tutors. The administration has asked you as IT manager to develop an object oriented model for new registration system. List possible objects in the new registration system, including their attributes and methods Identify possible use cases and actors Create a use case diagram that shows how students register


Download ppt "CHAPTER 6 OBJECT ANALYSIS."

Similar presentations


Ads by Google