What is Object Oriented Programming (OOPs)
o What
is Object Oriented Programming (OOPs)? Define The Major and Minor Elements of OOPs ?
Ans:- Object oriented programming is an approach
to program organization and development, which attends to eliminate some of the
pitfalls of conventional programming features which several new concepts. It is
a new way of organizing and developing programs as nothing to do with any particular
language.
OOPs in
Java is to improved code readability and reusability by defining a java program
efficiently.
The main principal of OOPs are ‘Abstraction’ , ‘Encapsulation’,
‘Inheritance’ and ‘Polymorphism’ . This Concept aim to implement real world entities
in program.
*Major Elements of OOPs
Concept: -
The major elements in OOPs are –
i.
Abstraction
ii.
Encapsulation
iii.
Modularity
iv.
Hierarchy
Abstraction :-
Abstraction refers
to the act of representing essential features without including the Background
detail’s explanation.
Example:- When
a class student is design the attributes enrolment no. , name, course and address are included , Where characterize
like pulse-rate and size of shoe are eliminated.
Encapsulation :-
The Wrapping up a data and methods into a
single unit is known as encapsulation. The data is not usable to the outside world,
and only those methods which are wrapped in the class can access it.
Comments
Post a Comment