Chapter 1 Exercises Principles of OOP
Chapter 1 Exercises Principles of OOP
Question 1
Page | 1
UMESH COMPUTER KENDRA (PH: 9897188951)
A process according to which a class acquires the characteristics from another class is
Encapsulation.
False
Question 2
Question 3
Question 4
Question 5
Function is a set of objects that share the common state and behaviour.
False
Question 6
Question 1
Question 2
Page | 2
UMESH COMPUTER KENDRA (PH: 9897188951)
(a) BASIC
(b) COBOL
Question 3
(a) Television
(b) ATM
Question 4
(a) Mobile
(b) Car
Question 5
(a) Encapsulation
(b) Inheritance
Question 4
For the processor to perform any computation, we need to give the instructions and
data as a sequence of 0's & 1's. This binary sequence that a processor understands
is known as its Machine Level language. Machine Level language is made up of
Page | 3
UMESH COMPUTER KENDRA (PH: 9897188951)
instructions and data that are all binary numbers. Machine Level language of a
processor differs from machine to machine. So programs written in Machine Level
language of one type of processors will not work on a different type of processor.
Question 6
Question 8
In Assembly Level language, instructions are written in more English like words
knowns as mnemonics. These instructions are not understood by the processor
directly. They are converted into equivalent Machine Level instructions through a
translator program called Assembler. Assembly Level language is machine
dependent that makes it unsuitable for writing portable programs that can execute
across machines.
Distinguish between
Question 1
Question 2
Question 3
Compiler Interpreter
It converts the whole source program It converts the source program into the object
into the object program at once. program, one line at a time.
It displays the errors for the whole It displays the error one line at a time and only
program together, after the after fixing that error the control goes to the next
compilation. line.
Question 1
Page | 5
UMESH COMPUTER KENDRA (PH: 9897188951)
Question 2
Question 3
Question 4
Page | 6
UMESH COMPUTER KENDRA (PH: 9897188951)
Question 5
Encapsulation restricts the free flow of data from one object to another. The data
and functions are wrapped together in an object in such a way that the data of a
particular object can only be used in associated functions. Thus, Encapsulation
helps in protecting the data from unauthorised access.
Question 6
Page | 7
UMESH COMPUTER KENDRA (PH: 9897188951)