Docsity

Object-Oriented Modeling: Abstraction, Inheritance, and Encapsulation, Slides of Computer Science

Partial preview of the text

Download Object-Oriented Modeling: Abstraction, Inheritance, and Encapsulation and more Slides Computer Science in PDF only on Docsity!

Object Oriented Model

Object Oriented Model

• Definition:

Object-oriented modeling (OOM) is

the construction of objects using a

collection of objects that contain

stored values of the instance

variables found within an object.

Unlike models that are record-

oriented, object-oriented values are

solely objects.

Data Abstraction

  • (^) Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the un-wanted characteristics of that situation or object.Lets take a person as example and see how that person is abstracted in various situations
  • (^) A doctor sees (abstracts) the person as patient. The doctor is interested in name, height, weight, age, blood group, previous or existing diseases etc of a person
  • (^) An employer sees (abstracts) a person as Employee. The employer is interested in name, age, health, degree of study, work experience etc of a person.

Inhertiance

  • (^) Different kinds of objects often have a certain

amount in common with each other. Mountain

bikes, road bikes, and tandem bikes, for

example, all share the characteristics of

bicycles (current speed, current pedal cadence,

current gear). Yet each also defines additional

features that make them different: tandem

bicycles have two seats and two sets of

handlebars; road bikes have drop handlebars;

some mountain bikes have an additional chain

ring, giving them a lower gear ratio.