Lesson 2 - Principles of Object Oriented Systems

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

Principles of Object Oriented Systems

i. Class
ii. Object
iii. Encapsulation
iv. Inheritance
v. Polymorphism
vi. Abstraction
Principles/Fundamentals of Object Oriented Systems

i. Class – it is the basic building block of object oriented


iv. Inheritance – it is the ability of child classes to
systems that serves as a template for defining data and
functions, which can be used elsewhere in the program. take up the properties of a class.
Example: The class DSE can have two child
ii. Object – it is an instance of a class. It represents a real world classes, DSE Sem 2 and DSE Sem 3. Students
object (physical or abstract) (objects) of both DSE Sem 2 and DSE Sem 3 have
Example: A class called DSE has students who have name the same attributes of class DSE: name and
and admission number. admission number.
The class has 5 students. These are the objects of that class.
iii. Encapsulation – it is the process of binding together v. Polymorphism – it is the ability of a child class or
attributes and/or functions in a class during OO an object to take up many forms of a class
programming. (Consider what’s being taught in OOP1 by your vi. Abstraction – views
teacher.)
UNIVERSITY STUDENT
EXAM MANAGEMENT
SYSTEM Parent/Super/Main/Base Class
Specialization Name
YearofEnrollment
Attributes
Admno
Generalization
Inheritance
DoExam()
GetResults()
Functions
ApplyforSpecials()
Graduate()

Child/
HOSPITALITY HOSPITALITY Derived/Sub
I.T./ENG Class
Graduate()=complete Graduate()=complete Graduate()=complete
course+project+attachment course+do group course+write a
hotel thesis+attachment
management+attach
Object ment
Mary Robert
SHAPES
Parent/Super/Main/Base Class
Length
Width Attributes
Height

Area() Functions
Inheritance
Volume()

Rectangle Circle
Triangle
Area() = Area()=pie*length*le
Object Area()=0.5*width*height
length*width ngth
End
---------------------------

You might also like