[go: up one dir, main page]

0% found this document useful (0 votes)
7 views2 pages

Chapter 1 Notes

ICSE

Uploaded by

vidhya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Chapter 1 Notes

ICSE

Uploaded by

vidhya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Ch-1 Introduction to Object Oriented Programming Concepts

OBJECTS AND CLASSES


Objects in programming are just like real world objects like humans, mobile
phones, cars, etc.
For example, Let there can be an object of class student- a student named TOM.
Tom has attributes like his name, address, etc.
Functions like studying, eating, etc.
A class is a blueprint of the object. It is called an object. It is called an object
factory because many objects having similar functions can be created in the same
class.
All object of the same class have same functions but their data can be different
from each other.
Advantages of Object Oriented Programming
1. OOP offers a clear flexible framework for programs that makes it completely
suitable for describing abstract data types.
2. The existing code can be modified easily so that new objects can be created
with a minimal difference to the present objects.
3. It provides a good structure for code libraries and the software components
can be adapted and modified by a programmer.
4. The program functions in OOP that are written by one user can be reprocessed
by other users without any modification.
Principles of Object Oriented Programming
1. Encapsulation: Converting data in ‘Capsule’
Encalpsulation is the wrapping together of data and functions that manipulate the
data, such that both are safe from outer interference and misuse.
It is a wrapper, and access to inside is controlled through an interface.
In encapsulation WRAPPER is the class
2. Abstraction It is representation of essential features of a system without
getting involved with the complexity of the entire system.
It is a simple representation for an actual item, like a software object representing
a real world objects.
Private data members can be accessed within same class only. This is Data hiding.
3. Inheritance: Inheritance is the capability of a class to acquire the properties
and functions of another class while adding its own functionality.
The class whose property is acquired is called a Base class and the class in which
the property of base class is acquired is called a child class.
In Java, we use extends keywords to inherit the properties of the parent class.
4. Polymorphism: Polymorphism is the capability of an interface to do different
things based on the data of different types of it accepts and gives the desired
output accordingly.

You might also like