You are on page 1of 6

Questions of chapter one

Q1- justify “object oriented programming overcomes the drawback of


procedural oriented programming ”

Solution: the object oriented language :-

1- treat data as critical element .

2- ties the data more closely to the functions that operate on it and protect
it from modification from outside function.

3- object oriented allow to decompose a problem into a number of object


and builds data and functions around the objects.

4-new data and function can be easily added


1
Q2- state the concepts of object oriented programming and explain
each one briefly
Solution:
1- class and object
Class: is a template/blue print describes the behaviours
And methods of an object.
Object:  is an instance of a class have behaviour and methods.
2- data encapsulation
wrapping of data and methods into a single unit called class
3- data abstraction
representing essential features without including the background details

2
4- Inheritance
is the process of acquiring the properties of object of another class
5- Polymorphism
The ability to take more than one form depend on data type such as
the addition “+”can be used to add 2 number or concatenate two
string .
6- dynamic binding
linking of a procedure call to the code to be executed in response to
the call.
7- Message communication
Is a set of objects that communicate with each other by sending and
receiving message.

3
Q3- what is the features of object oriented programming.
Solution:
 emphasis on data rather than function

 Programs divided into what known as objects

 Functions that operate on the data of an object are tied together

 data is hidden and cannot be accessed by external function

 objects may communicate with each other through methods

 new data and function can be easily added

 Follows bottom – up approach in program design


4
Q4- what is the benefits of object oriented programming
Solution
1.we can eliminate redundant code and extend the use of existing
classes.

2.we can build programs from the standard working modules rather
than starting writing the code from scratch( saving time)

3.the principle of data hiding helps the programmer to build secure


programs .

4. It is possible to have multiple objects to coexist without any


interference

5
5. It is easy to partition the work in a project based on objects

6. Object oriented systems can be easily upgraded from small to


large system.

7. Message passing technique make the interface descriptions with


external system much simpler

8. Software complexity can be easily managed

You might also like