You are on page 1of 11

CLASS – VIII

SUBJECT : COMPUTER
CHAPTER - 1
TOPIC – INTRODUCTION TO OBJECT ORIENTED
PROGRAMMING CONCEPTS
(ASSIGNMENT : QUESTIONS & ANSWERS )
PART : 1
ASSIGNMENT : QUESTIONS & ANSWERS

Q1. What are the two major types of programming languages ?


Answer : The two major types of programming languages are as follows :
i) Low Level Language ii) High Level Language
Q2. Briefly explain two major types of programming languages.
Answer : There are two types of programming languages . They are :
i) Low Level Language : Machine language and Assembly
language are known as low level language. Low Level languages are
machine oriented and require extensive knowledge of computer circuitry.

ii) High Level Language : High level languages offer English like keywords,
constructs for sequence , selection (decision) and iteration (looping) and use
variables and constants. The programs written in HLLs are converted into
machine language using compiler and interpreter software. Examples of
high level languages are BASIC , C, C++, JAVA etc.
Q3. Why are low level languages considered close to the machine ?
Answer : Machine language , in which instructions are written in binary code (using 1’s
and 0’s), is the only language the computer can execute directly. Machine
language is also known as low level language. For this reason, low level languages
are considered close to machine.
Q4. Why is it easier to program with high level languages ? Why are high level
languages considered close to the programmer ?
Answer: High level language programs are easier due to following reasons :
a) High-level languages are closer to English language and user-friendly.
b) Writing programs in these languages are very simple and required very less time.
c) They use language translator.

High level languages are considered close to the programmer due to following
reasons :
a) It provides programmer to specify actions to be executed.
b) It should provide a set of concept for the programmer to use when
thinking about what can be done.
Q5. Can you give examples of programming languages belonging to
each generation .
Answer Yes, the examples of programming language belonging to
each generation are as follows :
1. First Generation Programming Language : Machine Language
2.Second Generation Programming Language : Assembly Language
3. Third Generation Programming Language : BASIC , C, C++, JAVA
4. Fourth Generation Programming Language : Structured Query Language
(SQL) , Report generators such as Oracle reports , and Python
5. Fifth Generation Programming Language : Prolog and Mercury
CLASS – VIII
SUBJECT : COMPUTER
CHAPTER - 1
TOPIC – INTRODUCTION TO OBJECT ORIENTED
PROGRAMMING CONCEPTS
(ASSIGNMENT : QUESTIONS & ANSWERS )
PART : 2
Q6. What are programming paradigms ? Give names of some popular
programming paradigms .
Answer : A programming paradigm is a way of programming that is used to classify
programming languages by their features .It is an approach to programming.
The names of some popular programming paradigms are as follows :
a) Procedural or Modular Programming
b) Object Oriented Programming (OOP)

Q7. What is major characteristic of procedural programming ?


Answer : The major characteristics of procedural programming are as follows :
1. It uses top- down approach.
2. The program is divided into smaller blocks of programming codes called
procedures (functions), where each procedures performs a specific task.
3. The logic of a program is easy to develop.
Q8. What is major characteristic of modular programming ? How is it similar
to procedural programming ?
Answer : The major characteristics of modular programming are as follows :
a) In modular programming , a program consists of modules which in
each cases work independently of all others.
b) Each module can work with its own data as well as with the data
passed to it.
Modular programming is similar to procedural programming by using
module or procedure .
Q9. What are the short comings of procedural and modular programming
approaches ?
Answer : The short comings of procedural and modular programming
approaches are as follows :
a) They become complex to understand and develop.
b) They emphasis on procedures rather than data.
Q10. Write a short note on OO programming .
Answer : OBJECT ORIENTED PROGRAMMING (OOP) : The process of wrapping up of
data (field name) and functions (procedures) into a single unit called class, is
knownas object oriented programming
Examples : C++, JAVA , RUBY
Object oriented programming depends on two aspects :
1. Object 2. Class

Q11. How does OOP overcome short comings of traditional programming


approaches ?
Answer : The short comings of object oriented programming approaches are
as follows :
a) OOP is closer to real world model.
b) It supports hierarchical relationship among different objects through
inheritance.
Q17. What is inheritance ? How is it useful in programming terms ?
Answer : Inheritance : Inheritance is a process by which a class acquires the
properties of another class . It is useful in programming by terms allowing a
class to use attributes and behaviour of its parent class.
Q18. What are the advantages offered by inheritance ?
Answer : Inheritance offers following advantages
i) Re-usability.
ii)Avoiding Duplication of Code.
iii) Extensibility.
iv) Data Hiding.
Q20. What is polymorphism ? Explain with example.
Answer : Polymorphism : The word Polymorphism means processing more
than one form. Polymorphism is a concept of a function or an object to
acquire multiple forms. It allows an entity to take a variety of representations
Example : Function overloading

You might also like