Generalization 2-Object Oriented Analysis And Design-Lecture Slides, Slides of Object Oriented Analysis and Design

Concepts like action state, acctivity diagram, class diagram, constructiing and object, generalization, interaction diagram, software degin, state diagram use case diagram are main topics. Implemtentation are done using Unified Modelling Languae. This lecture includes: Generalization, Relationships, Supertype, Customer, Association, Multiplicity, Roles, Diagram, Class

Typology: Slides

2011/2012

Uploaded on 08/12/2012

dhanvant
dhanvant 🇮🇳

4.9

(9)

89 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Subtype2
Supertype
Subtype1
OO Relationships: Generalization
-Inheritance is a required feature of object orientation
-Generalization expresses a parent/child relationship among related classes.
-Used for abstracting details in several layers
Regular
Customer Loyalty
Customer
Customer
Example:
docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Generalization 2-Object Oriented Analysis And Design-Lecture Slides and more Slides Object Oriented Analysis and Design in PDF only on Docsity!

Subtype

Supertype

Subtype

OO Relationships: Generalization

-Inheritance is a required feature of object orientation

-Generalization expresses a parent/child relationship among related classes.

-Used for abstracting details in several layers

Regular Customer

Loyalty Customer

Example: Customer

 Represent relationship between instances of classes

 Student enrolls in a course  Courses have students  Courses have exams  Etc.

 Association has two ends

 Role names (e.g. enrolls)  Multiplicity (e.g. One course can have many students)  Navigability (unidirectional, bidirectional)

OO Relationships: Association

Class diagram

[from UML Distilled Third Edition ] docsity.com

Association: Model to Implementation

Class Student {

Course enrolls[4];

Class Course {

Student have[];

Student Course

has enrolls

OO Relationships: Aggregation

Class C

Class E 1 Class E 2

AGGREGATION

Container Class

Containee Classes

Bag

Apples Milk

Example

Aggregation: expresses a relationship among instances of related classes. It is a specific kind of Container- Containee relationship.

express a more informal relationship than composition expresses.

Aggregation is appropriate when Container and Containees have no special access privileges to each other.

[From Dr.David A. Workman] docsity.com

Aggregation vs. Composition

Composition is really a strong form of association components have only one owner components cannot exist independent of their owner components live or die with their owner e.g. Each car has an engine that can not be shared with other cars.

Aggregations may form "part of" the association, but may not be essential to it. They may also exist independent of the aggregate. e.g. Apples may exist independent of the bag.