1 / 35

Lecture Note 14 Object-Oriented System Analysis And Design

Part V: Software Engineering and Implementation. Lecture Note 14 Object-Oriented System Analysis And Design. Systems Analysis and Design Kendall & Kendall Sixth Edition. Major Topics. Introduction of Object-Oriented Design Concepts of Object-Oriented Design Object Class Inheritance

Download Presentation

Lecture Note 14 Object-Oriented System Analysis And Design

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. Part V: Software Engineering and Implementation Lecture Note 14Object-Oriented System Analysis And Design Systems Analysis and Design Kendall & Kendall Sixth Edition CS206 System Analysis & Design Note 14 By ChangYu

  2. Major Topics • Introduction of Object-Oriented Design • Concepts of Object-Oriented Design • Object • Class • Inheritance • Message • Polymorphism • Encapsulation • The Benefits in Using Object-oriented Approach • Introduction to Unified Modeling Language CS206 System Analysis & Design Note 14 By ChangYu

  3. Introduction • You will learn how to use Object-Oriented methods to document, analyze and model an information system. • Although traditional structured analysis is the most popular approach, the use of Object-oriented analysis and design is growing rapidly. CS206 System Analysis & Design Note 14 By ChangYu

  4. Object-oriented analysis describes an information system by identifying things called object. • Each object is a computer representation of some actual thing or event. • These Objects can be built as individual pieces and put together to form a system. • The end product of object-oriented analysis is an object model. • Later, the system developers can translate O-O designs directly into O-O program code modules using language C++ and Java. CS206 System Analysis & Design Note 14 By ChangYu

  5. Traditional approach and Object-oriented approach

  6. The characteristics of the Object-oriented analysis and design: • Ability to tackle (处理) challenging problems. • Improved communication between users, analysts, designer, and programmers. • Increased consistency in analysis and design. • Explicit (清楚) representation of commonality (公共) among system components. • System robustness (強壯) . • Reusability (再使用) of analysis, design, and programming results. CS206 System Analysis & Design Note 14 By ChangYu

  7. The Concepts of Object-oriented DesignObject • An object-oriented model is built around Objects , just as the E-R model is built around entities. • An object represent a real person, place, event, transaction, concept, or anything that we want to capture information from. • An object is an abstraction of something in a problem domain, reflecting the capabilities (能力) of the system to keep information about it and interact with it. CS206 System Analysis & Design Note 14 By ChangYu

  8. An object has • Attributes / Properties that describe the characteristics of an object. • Methods / Behaviours that defines specific tasks that an object can perform. • State of an object is defined by the value of its properties and its relationships with other objects at a particular point in time. • Instances : a single occurrence of an object. • Objects do not include primary key or foreign keys, instead each instance is assigned a unique identifier (UID) when it is created. • UID is hidden from the user and is used behind the scenes by thesystemonly to differentiate one object instance from another, even if they were to have the same values and methods.

  9. Example1 : An appointment system for a doctor’s office. • Objectsmight include doctor, patient, and appointment. • Attributes:a patient’s name, birth date, address, and phone number. • Method: an appointment object can schedule a new appointment, delete an appointment, Insert an appointment and locate the next available appointment. • State of a patient might be new, current, former. • Instances of the patient object: the specific patients Theresa Marks, Jim Maloney, Mary Wilson, are considered. CS206 System Analysis & Design Note 14 By ChangYu

  10. Example1: CS206 System Analysis & Design Note 14 By ChangYu

  11. Example2: Consider how the describes the family with parents, three children and three dogs.

  12. Class • An object class (Class) is a set of people, place, events, things, or transactions that share common attributes and perform common functions. • Class is a description of a set of objects with similar attributes, operations, methods, relationships and semantics (語意). • Each object belongs to a group category called a class. • All objects within a class share common attributes and methods. • An Example: All the objects that capture information about patients could fall into a class called patient because there are properties and methods that all patients share. CS206 System Analysis & Design Note 14 By ChangYu

  13. CS206 System Analysis & Design Note 14 By ChangYu

  14. Inheritance • Classes are arranged in a hierarchy. • The superclasses (general classes) are at thetop, the • subclasses (specific classes) are at the bottom. • Abstract Class: A class that has no direct instances, • but whose descendants (後代) may have direct instances. • Concrete Class: A class that can have direct instances. • An Example1: • A person may be a doctor, a patient. ---- Superclass • A doctor may be general practitioner, specialist. ---- Subclass CS206 System Analysis & Design Note 14 By ChangYu

  15. Example1: Superclass parent child Subclass Class Hierarchy

  16. Example2: The vehicle class includes common attributes and methods. Car, truck, minivan, and school bus are subclass of the Vehicle. Superclass Subclass CS206 System Analysis & Design Note 14 By ChangYu

  17. Inheritance means that classes can reuse attributes and methods that have been defined in other classes. • This figure shows that both doctor and patient are subclasses of the person and therefore they will inherit the attributes and methods of the person class.

  18. CS206 System Analysis & Design Note 14 By ChangYu

  19. CS206 System Analysis & Design Note 14 By ChangYu

  20. Message • A message is a command that tells an object to perform a certain methods. • Example1: The message ADD STUDENT signals the STUDENT class to perform the ADD STUDENT method. The message DELETE STUDENT signals the STUDENT class to perform.

  21. Example2: If a patient is new to the doctor’s office, the system will send an insert message to the application. The patient object will receive the instruction (message) and do what it needs to do to go about inserting the new patient into the system (method). CS206 System Analysis & Design Note 14 By ChangYu

  22. Polymorphism • The same message to two different objects can produce different results. • The concept that a message gives different meanings to different objects is called polymorphism. Example1:

  23. Example2: Inserting a instance means something different than inserting an appointment (i.e. different pieces of information need to be collected and stored). CS206 System Analysis & Design Note 14 By ChangYu

  24. Encapsulation • It is the idea of concealing(隱藏) the internal data and processes of an object from the outside. • You can view an object as a black box, because a message to the object triggers (引起) changes within the object without specifying how the changes must be carried out. • A black box concept is an example of encapsulation, which means that all data and methods are self-contained. A black box does not want or need outside interference (干擾). • Encapsulation allows objects to be used as modular components anywhere in the system, because objects send and receive messages but do not alter the internal methods of other object. CS206 System Analysis & Design Note 14 By ChangYu

  25. Example1: When a message (insert new patient) is sent to an object, the internal algorithms needed to respond to the message are hidden from other parts of the system. CS206 System Analysis & Design Note 14 By ChangYu

  26. Example 2:An IMSTRUCTOR object sends an ENTER GRADE message to an instance of the STUDENT RECORD class. Notice that the IMSTRUCTOR object and STUDENT RECORD class could be reused, with minor modification, in other school information systems where many of the attributes and methods would be similar. Message: ENTER GRADE INSTRUCTOR STUDENT RECORD CS206 System Analysis & Design Note 14 By ChangYu

  27. The Benefits in Using Object-oriented Approach • The concepts of polymorphism, classes, and inheritance, taken together, allow system analysts to • break a complex system into smaller, more manageable components, • work on the components individually, and • easily piece the components back together to form a system. • This modularity makes system development • easier to grasp (抓住), • easier to share among members of a project team, and • easier to communicate to users who are needed to provide requirements and confirm how well the system meets the requirements throughout the SDLC. CS206 System Analysis & Design Note 14 By ChangYu

  28. The project team is actually creating reusable pieces that can be plugged into other systems’ efforts or can be used as starting for other projects. • Time is saved because new projects don’t have to start completely from very beginning. • “Object-think” is a much more realistic way to think about the real world. • Communicating in terms of objects improves the interaction between user and SAs or developer. CS206 System Analysis & Design Note 14 By ChangYu

  29. Summary

  30. Introduction to UML • Just as structured analysis uses DFDs to model data and processes, systems analysts use the unified Modeling Language (UML) to describe object-oriented systems. • In 1990, object concepts were implemented in different ways by several developers. Their have their own methodology and notation. It is difficult for analysts in different organizations to use a common language in developing o-o tools and concepts for companies and universities. • In 1995, Rational Software brought three industry leaders (Grady Booch, Ivar Jacobson, James Rumbaugh) together to create an approach for o-o development, UML. • The objective of UML is to provide a common vocabulary (詞匯) of object-based terms and diagramming techniques that is rich enough to model any systems development project from analysis through implementation. • In November 1997, the Object Management Group (OMG) accepted UML as the standard diagramming notation for all Object-oriented development.

  31. Diagramming Techniques: UML defines a set of nine object diagramming techniques used to model a system.

  32. Unified Modeling Language Diagrams CS206 System Analysis & Design Note 14 By ChangYu

  33. All nine diagramming techniques use the same syntax and notation, making easier for analysis and developers to learn the language. • The same diagramming techniques are used throughout all phases of the SDLC. • The diagrams are changed over time to move from the logical design to the physical design and include implementation details of the system. • UML requires analysts and developers to break the system into use cases, the smaller pieces of the system, and deal with each separately. Therefore, the analysts and designers can focus on small views of the system rather than the entire system. CS206 System Analysis & Design Note 14 By ChangYu

  34. Key Aspects • The core of UML is formed by four techniques --Use case Diagrams, Sequence Diagrams, Class Diagrams, and Statechart Diagrams. • Use case diagram summarizes the set of use cases for a logical part of the system. • Sequence diagrams, class diagrams, and statechart diagrams are used to further define the use cases from various perspectives. • The order of creating diagrams: • Use Case Diagram • Sequence Diagram Class Diagram • Statechart Diagram CS206 System Analysis & Design Note 14 By ChangYu

  35. The integration of four UML Diagrams CS206 System Analysis & Design Note 14 By ChangYu

More Related