CHAPTER -10
Computer Science HSLC SEBA Board
Object Oriented
Programming
A.
SHORT ANSWER QUESTIONS:
1. What do you mean by programing
paradigm?
Programming paradigm
means set of design principle that define the program structure. It is an approach
to programming. The programing paradigm is all about the writing style and
organizing the program code in a specific way.
2. Define object.
In Object Oriented
Programming object means a real-world entity such as chair, pen, book, pen,
cat, dog, etc. we say it as an instance of a class.
3. Define class.
A class is a user
defined blueprint or prototype from which objects are created.
4. What is encapsulation?
Encapsulation is the
process of binding data members and methods of a program together to do a specific
job. Without reveling unnecessary detail.
5. What is data hiding?
Data hiding is also
known as abstraction, it is used t display only the importance information by
hiding the implementation part.
6. What is polymorphism?
Poly means many and
forms means many, so polymorphism means one common method is used in different
ways.
7. Name the four object-oriented programming
languages.
C++, C#, Java, Phyton
8. Name the first object-oriented program.
Simula is the first
object-oriented program.
9. What is abstraction?
Abstraction displays
only the important information by hiding the implementation part.
B.
LONG ANSWER QUESTIONS:
1.
Mention four characteristics of procedure-oriented
programming.
Four characteristics
of procedure-oriented programming are:
i)
It emphasis on algorithm.
ii)
Large programs are
divided into smaller programs known as functions.
iii)
Functions can communicate
by global variable.
iv)
Data move freely from
one function to another function.
2.
Mention two advantages
and two disadvantages of procedure-oriented programming languages.
The two advantages
and disadvantages of procedure-oriented programing language are:
Advantages:
i)
It is much easier to
learn as first programming language for beginners.
ii)
The use of standard
library functions brings down significant in the overall development cost and
time.
Disadvantages:
i)
It is difficult to present
real world as objects.
ii)
It is difficult to
protect the data from inadvertent changes.
3. Explain four features of OOP.
Four features of OOP
are:
i)
Encapsulation:
encapsulation is the process of binding data members and method of a program
together to do specific job, without reveling unnecessary details.
ii)
Abstraction: Abstraction
display only the important information by hiding the implementation part. The concept
of abstraction relates to the idea of hiding data that are not needed for
presentation.
iii)
Polymorphism: Polymorphism
means one common method is used in different ways.
iv)
Inheritance:
Inheritance is the process of acquiring or inheriting properties of one class
to the other. The process deriving from one class to another class is called
inheritance. The existing class is called the parent class and the new class is
called child class.
4. List four advantages of OOP.
Four advantages of OOP
are:
i)
OPP can support large
scale and complex software development project.
ii)
It allows code reusability.
iii)
Better representation
of real-world things as objects.
iv)
Avoid unnecessary
data exposure to the user by abstraction.
5. Differentiate between procedure-oriented
programming and object-oriented programming.
Difference between procedure-oriented
programming and object-oriented programing are given below:
Procedure
Programming |
Object Oriented
Programming |
i)
Program is divided into
functions. ii)
It follows top-down approach. iii)
It doesn’t used access specifier. iv)
Data hiding not supported |
i)
Program is divided into
objects. ii)
It follows bottom-up approach. iii)
It doesn’t use access
specifier. iv)
Encapsulation is used to hide
the data. |
0 Comments