1 / 45

Harry S. Truman College

Harry S. Truman College. Prof. Mohammad Moizuddin Class CIS 250 Fall 2013. Systems Analysis and Design 10 th Edition. Chapter 6 Object Modeling. Chapter Objectives. Explain how object-oriented analysis can be used to describe an information system

adrian-hahn
Download Presentation

Harry S. Truman College

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Harry S. Truman College Prof. Mohammad Moizuddin Class CIS 250 Fall 2013

  2. Systems Analysis and Design 10th Edition Chapter 6 Object Modeling

  3. 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

  4. Chapter 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

  5. Overview of Object-Oriented Analysis Object-oriented (O-O) analysis describes an information system by identifying things called objects that represent a real person, place, event, or transaction O-O methodology is popular because it integrates easily with object-oriented programming languages such as Java, Smalltalk, VB.Net, Python, and Perl Programmers also like O-O code because it is modular, reusable, and easy to maintain

  6. Overview of Object-Oriented Analysis (Cont.) • Object-Oriented Terms and Concepts • Unified modeling language (UML) • Method of visualizing and documenting an information system • Attributes - Characteristics that describe the object • Methods - Tasks or functions that the object performs • Message – A command to perform a method • Class - A group of similar objects • Instance - A specific member of a class

  7. Overview of Object-Oriented Analysis (Cont.) • Objects • Represented as a rectangle with • the object name at the top, followed by the object’s attributes and methods FIGURE 6-2 Objects have attributes, can send and receive messages, and perform actions called methods

  8. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-4 The PARENT object includes four attributes and two methods. Mary Smith, Ahmed Ali, and Anthony Greene are instances of the PARENT object

  9. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-5 The CHILD object includes five attributes and five methods. James Smith, Amelia Ali, and Misty Greene are instances of the CHILD object

  10. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-6 The DOG object includes six attributes and four methods. Buddy, Annie, and Megan are instances of the DOG object

  11. Overview of Object-Oriented Analysis (Cont.) • Attributes • Characteristics that describe the object FIGURE 6-8 The STUDENT object includes seven attributes and six methods. The INSTRUCTOR object includes eight attributes and six methods

  12. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-10 The REGISTRATION RECORD object includes five attributes and five methods FIGURE 6-9 The FITNESS-CLASS SCHEDULE object includes seven attributes and seven methods

  13. Overview of Object-Oriented Analysis (Cont.) • Methods • Specific tasks that an object can perform FIGURE 6-13 In the fitness center example, the ADD STUDENT method requires the STUDENT object to perform nine specific steps FIGURE 6-12 The MORE FRIES method requires the server to perform seven specific steps

  14. Overview of Object-Oriented Analysis (Cont.) • Messages • A command that tells an object to perform a certain method • The same message to two different objects can produce different results (polymorphism) • You can view an object as a black box, message can trigger a change in the object without specifying how the changes must be carried out • Selecting gas at a gas pump – you don’t know how it works • Encapsulation • All data and methods are self-contained FIGURE 6-16 In a school information system, an INSTRUCTOR object sends an ENTER GRADE message to an instance of the STUDENT RECORD class

  15. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-15 In an example of polymorphism, the message GOOD NIGHT produces different results, depending on which object receives it FIGURE 6-14 The message ADD STUDENT signals the STUDENT class to perform the ADD STUDENT method. The message DELETE STUDENT signals the STUDENT class to perform the DELETE STUDENT method

  16. Overview of Object-Oriented Analysis (Cont.) • Classes • An object belongs to a group or category called a class • All objects within a class share common attributes and methods • Subclasses - Objects within a class • TRUCK objects represent a subclass within the VEHICLE class, along with other subclasses called CAR, MINIVAN, and SCHOOL BUS • Superclass – A general category • A NOVEL class belongs to a superclass called BOOK, because all novels are books

  17. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-17 The VEHICLE class includes common attributes and methods. CAR, TRUCK, MINIVAN, and SCHOOL BUS are instances of the VEHICLE class FIGURE 6-18 The fitness center EMPLOYEE class includes common attributes and methods. INSTRUCTOR, MANAGER, and OFFICE STAFF are subclasses within the EMPLOYEE class

  18. Overview of Object-Oriented Analysis (Cont.) FIGURE 6-19 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

  19. Relationships Among Objects and Classes • Relationships • Enable objects to communicate and interact as they perform business functions and transactions required by the system • Describe what objects need to know about each other • How objects respond to changes in other objects • Effects of membership in classes, superclasses, and subclasses • Strongest relationship is called inheritance • Inheritance enables an object, called a child, to derive one or more of its attributes from another object, called a parent

  20. Relationships Among Objects and Classes (Cont.) FIGURE 6-20 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

  21. Relationships Among Objects and Classes (Cont.) • Object Relationship Diagram • Shows the objects and how they interact to perform business functions and transactions FIGURE 6-21 Object relationship diagram for the fitness center

  22. 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 • 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

  23. Object Modeling with the Unified Modeling Language (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 FIGURE 6-22 In a medical office system, a PATIENT (actor) can MAKE APPOINTMENT (use case) FIGURE 6-23 Three use case examples. The UML symbol for a use case is an oval. The actor is shown as a stick figure

  24. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-24 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

  25. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-25 The ADD NEW STUDENT use case description documents the process used to add a current student into an existing class

  26. Object Modeling with the Unified Modeling Language (Cont.) • Use Case Diagram • 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)

  27. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-27 use case diagram to handle work at an auto service department

  28. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-28 A use case diagram to create a school bus route

  29. Object Modeling with the Unified Modeling Language (Cont.) • Class Diagrams • Shows 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 • Diagram also includes a concept called cardinality, which describes how instances of one class relate to instances of another class

  30. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-29 Examples of UML notations that indicate the nature of the relationship between instances of one class and instances of another class

  31. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-30 Class diagram for a sales order use case (attributes and methods omitted for clarity)

  32. Object Modeling with the Unified Modeling Language (Cont.) • Sequence Diagrams • A dynamic model of a use case, showing the interaction among classes during a specified time period • Graphically documents the use case by showing the classes, the messages, and the timing of the messages • Include symbols that represent classes, lifelines, messages, and focuses

  33. Object Modeling with the Unified Modeling Language (Cont.) • Classes • Identified by a rectangle with the name inside • Classes that send or receive messages are shown at the top of the sequence diagram • Lifelines • Identified by a dashed line • The lifelinerepresents 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 • Identified by a line showing direction that runs between two objects • The label shows the name of the message and can include additional information about the contents • Focuses • Identified by a narrow vertical shape that covers the lifeline • The focusindicates when an object sends or receives a message FIGURE 6-31 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

  34. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-32 The sequence diagram for the ADD NEW STUDENT use case. The use case description for ADD NEW STUDENT is shown in Figure 6-25 on page 240

  35. Object Modeling with the Unified Modeling Language (Cont.) • State Transition Diagrams • Shows 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 FIGURE 6-33 An example of a state transition diagram for a bank account

  36. Object Modeling with the Unified Modeling Language (Cont.) • Activity Diagrams • Shows the actions and events as they occur • Show the order in which the actions take place and identify the outcomes FIGURE 6-34 An activity diagram shows the actions and events involved in withdrawing cash from an ATM machine.

  37. Object Modeling with the Unified Modeling Language (Cont.) • Business Process Modeling (BPM) • Represent the people, events, and interaction in a system • Outside rectangle is called a pool, and designated swim lanes show specific actions and events • Swim lanes can interact when certain events occur

  38. Object Modeling with the Unified Modeling Language (Cont.) FIGURE 6-35 The Bizagi Modeler site offers free BPM software that uses a swimming pool and swim lanes to represent interactive business processes and events (Continues)

  39. Object Modeling with the Unified Modeling Language (Cont.) • CASE Tools • Object modeling requires many types of diagrams to represent the proposed system • Creating the diagrams by hand is time consuming and tedious • CASE tools speed up the process and provide an overall framework for documenting the system components • CASE tools ensure consistency and provide common links so that once objects are described and used in one part of the design, they can be reused multiple times without further effort FIGURE 6-35 The Bizagi Modeler site offers free BPM software that uses a swimming pool and swim lanes to represent interactive business processes and events

  40. Organizing the Object Model • Develop an object relationship diagram that provides an overview of the system • 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

  41. 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

  42. Chapter Summary (Cont.) • 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 • Use case describes a business situation initiated by an actor, who interacts with the information system

  43. Q&A

  44. Chapter # 6 Class Work # 6 Page: 248: (Q9) Home Work # 6 Page: 249: Osceola Auto Parts (Q2) Assignment # 6

  45. Chapter 5 Quiz (Next Week) Quiz

More Related