Computer - Application 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Introduction to OOP concept

Computer Applications: Set of Programs to perform a set of specific tasks to solve a


particular problem. Such as accounting applications, game applications etc.

Program: Set of instructions, arranged in sequential and logical order to get the desired
output. OOP treats data as a critical element in
the programing development and does
not allow it to flow freely around the
Programmer: A person who writes a computer program. system. POP treats data as a secondary
element and allows it to flow freely from
function to function.
Programming: The process of writing a computer program.

Programming Language: A set of commands and syntax used to create a computer


program. Such as Basic, C, C++, Java etc.

Programming Paradigm: An approach or style of programming. It supports a set of


concepts. Such as POP, OOP etc.
Difference between POP and OOP-
POP(Procedure Oriented Programming) OOP (Object Oriented Programming)
 The program is divided into  The program is divided into
small tasks (functions). Objects.
 Follows a top-down approach.  Follows a bottom-up approach.
 Data and functions are separate.  Data and functions are grouped
into a single unit.
OOP is more secure, modular, extensible
and reusable than POP.
Principles of Object Oriented Programming:

For Object Oriented Programming Language, It should have the ability to work with
classes and objects and must use the following four fundamental object oriented
principles: OOP is generally considered to be more powerful than
 Data Abstraction POP because it allows software developers to create
more sophisticated programs. OOP languages also tend
 Encapsulation to be more reusable and easier to maintain than POP
 Inheritance languages. However, some programmers prefer POP
because it can be easier to understand and debug.oop
 Polymorphism also support inheritance and

Class: A group of objects with common attributes and behaviour. For example- Book,
Fruit, Student etc.
A class can be thought of as a template or blueprint for multiple objects with similar
features.

Computer Applications Notes Volume I (Class IX) for ICSE examinations 2022 by Hem Sir Page 1
Object: An identifiable entity with some attributes and behaviour. It is known as
instance of class. For example- a book of Physics, a mango, Mohan(a student) etc.
Attributes: Characteristics or properties of class and object which are represented by data.
For example – attributes of student class are roll, name, address, date of birth etc.

Behaviour: An action that is represented by function. For example- behaviour of student


class are Study, walk, sleep etc. and we know that in OOP, data and function are grouped into a
single unit. and that grouping takes place by the mechanism
called encapsulation
Data Abstraction: The act of representing essential features without including the
background details. For example- to change a TV channel we only need to know about
the buttons of remote rather than what is happening inside.

Encapsulation: A mechanism that binds the attributes and behaviour together into a
single unit (class). For example- All the complexity of TV remote are hidden inside the
remote button.
We can say that encapsulation provides data abstraction.

Inheritance: A mechanism by which one class acquires the properties of another class. For
example – Vehicle class can be inherited by TwoWheeler class, FourWheeler class etc
which have the common attributes and behaviour of Vehicle class.

The common class that gets inherited is called the Parent class / Base class / Super class.

The class that inherits from the common class is called the Child class / Derived class /
Sub class.

The keyword extends is used for inheritance in Java.

Polymorphism: It means many forms. It is the ability of a function or an object to acquire


multiple forms. For example- The work of + varies according to its operands:
2+3  5 (sum)
“2” + “3”  23 (concatenation)
‘2’ + ‘3’  101 (sum of Unicode)
Similarly, using method overloading we can use area( ) function to find the area of
different shapes.

Computer Applications Notes Volume I (Class IX) for ICSE examinations 2022 by Hem Sir Page 2

You might also like