1 / 26

OBJECT-ORIENTEDNESS

OBJECT-ORIENTEDNESS. KCDCC. model system as a collection of interacting objects. O-O Modelling <--> O-O Programming. similar conceptual philosophy. different purpose. WHAT IS OBJECT-ORIENTEDNESS?. KCDCC. what is an object?. real world thing - something tangible.

giulia
Télécharger la présentation

OBJECT-ORIENTEDNESS

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. OBJECT-ORIENTEDNESS KCDCC

  2. model system as a collection of interacting objects O-O Modelling <--> O-O Programming similar conceptual philosophy different purpose WHAT IS OBJECT-ORIENTEDNESS? KCDCC

  3. what is an object? real world thing - something tangible conceptual / virtual / abstract individuality all objects have identity all objects are distinguishable - twins properties identity - state - behaviour (identity - data - operations) OBJECTS KCDCC

  4. There are many THINGS in the World From: Sigfried S (1996). Understanding Object-Oriented Software Engineering

  5. The World Our Model 5/26 From: Sigfried S (1996). Understanding Object-Oriented Software Engineering

  6. individual, identifiable entity (real or abstract) with a well defined role in the problem domain OBJECTS (cont..) KCDCC

  7. identity property of an object which distinguishes it from all other objects state (data) attributes of an object attributes have values behaviour (operations/methods) describes how object acts & reacts procedures / operations (messages) OBJECT PROPERTIES KCDCC

  8. attributes (data) descriptor (variable) that holds value e.g. name, weight, colour, model, may have same across classes e.g. weight behaviour (operations/methods) function or procedure that may be applied to or by an object e.g. Move, Open, Draw, ... all objects in a class share same operations KCDCC OBJECT PROPERTIES (cont.)

  9. instance (object) unique individual all values unique individuality from differences in attribute values (but may differ in only location & orientation) class abstraction - generalization group of objects with common properties differentiation in attributes attributes can have ranges / options KCDCC CLASSES AND INSTANCES

  10. Similar THINGS can be GROUPED 10/26 From: Sigfried S (1996). Understanding Object-Oriented Software Engineering

  11. From: Rumbaugh et al. (1991). Object-Oriented Modeling and Design

  12. From: Rumbaugh et al. (1991). Object-Oriented Modeling and Design

  13. taxonomical / typological a_kind_of, a_type_of, is_a, an_instance_of ako, ato, isa, aio aggregation a_part_of, a_component_of apo, aco others functional, ownership, connectivity, ... provides_access, owned_by, joins KCDCC CLASS RELATIONSHIPS

  14. brings order knowledge ordered hierarchically linked to categorization no simple recipe no perfect class structure & set of objects difficult - boundaries are fuzzy e.g. where does knee begin and end difficult to define precisely attributes & values e.g. cup and bowl different views CLASSIFICATION depends on purpose KCDCC

  15. superclass, subclass, instance general to specific fewer members - more specific ancestors - descendants parent - child CLASSIFICATION (cont.) 15/26 KCDCC

  16. superclass, subclass, instance subclass inherits all properties of superclass instance special case of subclass superclass A recursive ato inherit ‘up the line’ B superclass subclass ato if class B subclass of class A and class C subclass of class B then class C inherits from class B and class A C subclass aio C1 instance reuse avoids redundancy INHERITANCE KCDCC

  17. From: Rumbaugh et al. (1991). Object-Oriented Modeling and Design

  18. vehicle MULTIPLE INHERITANCE ato ato land vehicle water vehicle ato ato ato ato car amphibious vehicle boat 18/26

  19. generalization extract common characteristics create higher-level abstraction bottom-up specialization add new features - extension e.g. hinged door adds swing behaviour may constrain ancestor attributes e.g. circle special case of ellipse must do one of above top-down GENERALIZATION / SPECIALIZATION KCDCC

  20. assembly / component special form of relationship aggregate object made up of component objects treated as one unit - an object recursive components may be aggregations structural hierarchy orthogonal concept to generalization/specialization part/whole vs subclass/class apo, aco vs ako, ato, isa, aio KCDCC AGGREGATION / DECOMPOSITION 20/26

  21. fluorescent lamp incandescent lamp KCDCC AGGREGATION / DECOMPOSITION addition of components lamp aco ato switch base cover aco aco socket ballast starter

  22. KCDCC AGGREGATION / DECOMPOSITION addition of components (cont.) lamp aco ato switch base cover isa fluorescent lamp isa aco L1 ballast starter isa isa aco isa isa switch1 base1 cover1 ballast1 starter1 22/26

  23. encapsulation / modularity localize data & procedures in a module classification taxonomic / typologic hierarchy makes order inheritance reusability aggregation structural hierarchy hides / adds details KCDCC O-O CONCEPTS

  24. KCDCC O-O LANGUAGES Smalltalk first popular OOL C++ strongly typed - lots of housekeeping Eiffel strongly typed - garbage collection CLOS (Common Lisp Object System) O-O extension of COMMON LISP encapsulation not enforced Objective C Java cleaned-up version of C++ - no pointers distributed

  25. databases relationships used to store persistent data data doesn’t vanish when program stops execution O-O programming objects not persistent OODMS object information persistent KCDCC O-O DATABASES 25/26

  26. CAD systems & applications implemented using O-O technology systems create and manipulate objects information embedded in objects data exchange & integration use O-O concepts no standard model for O-O systems concepts of state and behaviour fundamental KCDCC IMPACT OF 0-0 SYSTEMS ON MODELLING 26/26

More Related