0% found this document useful (0 votes)
27 views

Lesson 2 - Principles of Object Oriented Systems

The document outlines 6 key principles of object-oriented systems: class, object, encapsulation, inheritance, polymorphism, and abstraction. It defines each principle and provides examples to illustrate class and inheritance. The principles serve as the basic building blocks for defining data and functions in object-oriented programming.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Lesson 2 - Principles of Object Oriented Systems

The document outlines 6 key principles of object-oriented systems: class, object, encapsulation, inheritance, polymorphism, and abstraction. It defines each principle and provides examples to illustrate class and inheritance. The principles serve as the basic building blocks for defining data and functions in object-oriented programming.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 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