Download presentation
Presentation is loading. Please wait.
1
Software Engineering Lecture 10
2
Object Orientation An object is something that exists in the context of a system. An object is instance of class
3
Classes A class is a category into which objects can be organized.
A Class is also a template from which objects can be created. Classes ( and the objects within Class have) Attributes: properties ( size, color, gender) Operations: Functionality ( swim, eat, be eaten)
4
Inheritance
5
Relationship Objects do not exist in isolation, they exists in relationship to other objects.
6
Generalization In generalization the child class is based on the parent class. The relationship indicates that two classes are similar but have some differences.
7
Association Association means that two classes are connected (i.e., related) in some way. Information about one class is linked to data about another class. One class works with another to perform a task. One class acts upon the other class For example: Shark fish eats the GoldFish
8
AGGREGATION Aggregation indicates a relationship between a whole and its parts.
9
COMPOSITION Composition is a strong form of aggregation
In this kind of relationship each part may belong to one whole.
10
COMPOSITION-Cont.. In composition relationship, when the whole is destroyed, its parts are also destroyed, as well.
11
MULTIPLICITY Multiplicity shows number of objects that can participate in a relationship. One class occupies one classroom. (1-to-1) One teacher teaches many classes.(1-to-*) Many_to_Many One teacher teaches many students. One students learn from many teachers.
12
POLYMORPHISM An ability to take on many different forms.
Polymorphism applies to : Objects Operations
13
Polymorphic Objects A Polymorphic object is one whose true type hides within a superclass
14
Polymorphic Operation
In Polymorphic Operation, the operation may be carried out in different ways based on the class of the object that’s doing the operation.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.