1 / 22

CSC-3325: Chapter 7

CSC-3325: Chapter 7. Title : Object Oriented Analysis and Design Reading: I. Sommerville , Chap . 12 + extra support. Object Oriented analysis. Objects are abstractions of real-world or system entities … Objects are independent and encapsulate state …

tilly
Download Presentation

CSC-3325: Chapter 7

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. CSC-3325: Chapter 7 Title : Object Oriented Analysis and Design Reading: I. Sommerville, Chap. 12 + extra support Dr Driss Kettani, from I. Sommerville

  2. Object Oriented analysis • Objects are abstractions of real-world or system entities… • Objects are independent and encapsulate state… • System functionality is expressed in terms of object services… • Objectscommunicate by message passing… Dr Driss Kettani, from I. Sommerville

  3. What is an object ? An object is an entity which has a state and a defined set of operations which operate on that state. The state is represented as a set of object attributes. The operations associated with the object provide services to other objects (clients) which request these services when some computation is required. Objects are created according to some object class definition. An object class definition serves as a template for objects. It includes declarations of all the attributes and services which should be associated with an object of that class. Dr Driss Kettani, from I. Sommerville

  4. Object models • Object models describe the system in terms of object classes • An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object Dr Driss Kettani, from I. Sommerville

  5. OO analysis, how to proceed ? • The identification of objects, their attributes and services • The organization of objects into an aggregation hierarchy • The construction of dynamic object-use descriptions which show how services are used • The specification of object interfaces Dr Driss Kettani, from I. Sommerville

  6. Object models • Various object models may be produced • Objects models • Inheritance models • Aggregation models • Service models Dr Driss Kettani, from I. Sommerville

  7. Object models • Natural ways of reflecting the real-world entities manipulated by the system • More abstract entities are more difficult to model using this approach • Object class identification is recognized as a difficult process requiring a deep understanding of the application domain • Object classes reflecting domain entities are reusable across systems Dr Driss Kettani, from I. Sommerville

  8. Object class notation Dr Driss Kettani, from I. Sommerville

  9. Object identification • Identifying objects is the most difficult part of object oriented design. • There is no 'magic formula' for object identification. It relies on the skill, experience and domain knowledge of system designers. • Object identification is an iterative process. You are unlikely to get it right first time Dr Driss Kettani, from I. Sommerville

  10. Approaches to identification • Use a grammatical approach based on a natural language description of the system (used in Hood method) • Base the identification on tangible things in the application domain • Use a behavioural approach and identify objects based on what participates in what behaviour Dr Driss Kettani, from I. Sommerville

  11. An office information system The Office Information Retrieval System (OIRS) isan automatic file clerk which can filedocumentsunder some name in one or more indexes, retrieve documents,display and maintaindocument indexes, archive documents and destroydocuments. The system is activated by a request from the user and always returns a message to the user indicating the success or failure of the request. Dr Driss Kettani, from I. Sommerville

  12. Inheritance models • Organise the domain object classes into a hierarchy • Classes at the top of the hierarchy reflect the common features of all classes • Object classes inherit their attributes and services from one or more super-classes. these may then be specialised as necessary • Class hierarchy design is a difficult process if duplication in different branches is to be avoided Dr Driss Kettani, from I. Sommerville

  13. Library class hierarchy Dr Driss Kettani, from I. Sommerville

  14. User class hierarchy Dr Driss Kettani, from I. Sommerville

  15. Advantages of inheritance • It is an abstraction mechanism which may be used to classify entities • It is a reuse mechanism at both the design and the programming level • The inheritance graph is a source of organisational knowledge about domains and systems Dr Driss Kettani, from I. Sommerville

  16. Multiple inheritance • Rather than inheriting the attributes and services from a single parent class, a system which supports multiple inheritance allows object classes to inherit from several super-classes • Can lead to semantic conflicts where attributes/services with the same name in different super-classes have different semantics • Makes class hierarchy reorganisation more complex Dr Driss Kettani, from I. Sommerville

  17. Multiple inheritance Dr Driss Kettani, from I. Sommerville

  18. Object aggregation • Aggregation model shows how classes which are collections are composed of other classes • Similar to the part-of relationship in semantic data models Dr Driss Kettani, from I. Sommerville

  19. Object aggregation Dr Driss Kettani, from I. Sommerville

  20. Service-usage models • These models show how services provided by one object are used by other objects • Must be used sparingly as, obviously, some objects provide common services which are used by many other objects in the system Dr Driss Kettani, from I. Sommerville

  21. Service usage Dr Driss Kettani, from I. Sommerville

  22. Object interface design • Concerned with specifying the detail of the object interfaces. This means defining attribute types and the signatures and semantics of object operations • Representation information should be avoided • Precise specification is essential so a programming language description should be used Dr Driss Kettani, from I. Sommerville

More Related