0% found this document useful (0 votes)
11 views3 pages

Basic-Concepts-Of-Oop

Uploaded by

Irine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Basic-Concepts-Of-Oop

Uploaded by

Irine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CHAPTER 6

BASIC CONCEPTS OF OOP


One mark questions:

1. What are methods?


Methods are functions inside the class through which the data members of a class can be accessed

2. What do you mean by overloading?


Overloading is a feature where a function or an operator have different meanings depending upon
the context

3. Mention the types of overloading.


Function overloading
Operator overloading

4. What is function overloading?


Function overloading is a process of defining two or more functions with same name but differing in
the number or data type of arguments

5. What is data hiding?


Data Encapsulation wraps data and functions into a single unit called class. The data members can
be accessed only through methods or functions present inside the class. This insulation of the data
from direct access by the program is called data hiding or information hiding

Two marks questions:


1. What is base class and derived class? Or what is super class and subclass?
Base class – class whose properties are inherited by another class called derived class or sub class
Derived class – class that inherits the properties of the base class or super class

[PS: Individual definitions can be asked under one mark question too]

2. What is the significance of Class in OOP?


A class is the template that defines the characteristics of a certain class of object. It is a way of
grouping objects having similar characteristics
Classes are user-defined data types. It can have both data members and member functions

3. Explain the term polymorphism.


The ability of a function or an operator to take more than one form is called polymorphism.
The types of polymorphism are
 Compile-time polymorphism (includes operator overloading and function overloading)
 Runtime polymorphism (function overriding using virtual functions)

Three marks questions:

1. What is inheritance? Mention its types.


Inheritance is the process by which objects of one class acquires the properties of the objects of
another class.
Types are
 Single Inheritance
 Multiple Inheritance
 Multi-level Inheritance
 Hierarchical Inheritance
 Hybrid Inheritance

2. Define overloading. Mention its types.


Overloading is a feature where a function or an operator have different meaning depending upon the
context.
Types are
 Function Overloading
 Operator Overloading

3. Mention any three High level languages that follow the OOP.
C++, C#, Python.

4. Differentiate between class and objects.


Object - Objects represent real or abstract things, with a name. Objects of a particular class have
common behaviour and characteristics
Class - A class is the template that defines the characteristics of a certain class of object. It is a way of
grouping objects having similar characteristics
Example-For the class- Planet -> Mercury, Venus, Earth are objects

Five marks questions:


1. Explain any five characteristics /features/ basic concepts of OOP.
Object - Objects represent real or abstract things, with a name. Objects of a particular class have
common behaviour and characteristics
Class - A class is the template that defines the characteristics of a certain class of object. It is a way of
grouping objects having similar characteristics
Abstraction - refers to the act of representing essential features without including the background
details or explanations.
Encapsulation - The wrapping up of data and functions into a single unit called class is known as
Encapsulation.
Inheritance - is the process by which objects of one class acquires the properties of the objects of
another class.
Polymorphism - means the ability of a function or operator to take more than one form.
Inheritance - is the process by which objects of one class acquires the properties of the objects of
another class.
Dynamic binding (late binding) - means that the code associated with a given procedure call is known
only at the time of execution of a program.
Message passing - A message for an object is a request for execution of a procedure. Message passing
will invoke a function in the receiving object that generates the desired result. Message passing
involves specifying the name of the object, the name of the function (message) and the information
to be sent.

[PS: Any 5 to be explained for 5 marks question.


Individual characteristics can be asked to be defined for one mark question too.
Any 5 of them can be asked to be defined for 5 mark question too.
Any 2 features to be explained for a 2 mark question and any 3 to be explained for a 3 mark question]

2. What are the advantages OOP over earlier programming methods?


 Models the real world entities very well
 Programs are modularized based on the principle of classes and objects
 Inheritance eliminates redundant code and extends the use of existing classes
 Encapsulation helps the programmer to build secure programs that cannot be invaded by code
in other parts of the program
 Easier to develop complex software, because complexity can be minimized through
inheritance
 Data abstraction separates object specification and object implementation
 Creation and implementation of OOP code is easy and reduces software development time
 Message passing techniques support for communication between objects makes the interface
descriptions with external systems much simpler

[PS: Any 2 advantages to be written for a 2 mark question and any 3 advantages to be written for
a 3 mark question]

3. Define OOP. Write the limitations of OOP.


OOP is a programming paradigm that provides a way to modularize programs by combining both
data and the functions that operate on that data into a single unit called object
Limitations of OOP
 OOP software is not having set standards
 To convert a real world problem into an object oriented model is difficult
 Proper planning and design is required before programming using OOPs technique
 Adaptability of flow diagrams and object oriented programming using classes and objects is a
complex process
 The classes are overly generalized

[PS: Any 2 limitations to be written for a 2 mark question and any 3 limitations to be written for a
3 mark question]

4. Mention the different applications of OOP.


 Computer graphic applications
 CAD/CAM software
 Object-oriented database
 Real time systems
 Simulation and modelling
 Artificial Intelligence and expert systems
 User interface design like windows

[PS: Any 2 applications to be written for a 2 mark question and 3 applications to be written for a
3 mark question]

5. Write the differences between procedural programming and object-oriented programming.


Procedural programming Object-oriented programming
 Follows top-down approach in the program design  Follows bottom-up approach in the program
 Emphasis is on procedure rather than data design
 Large program is divided into units called functions  Emphasis is on data rather than procedure
 Data is not hidden and can be accessed by external  Entire program is divided into objects
functions  Data is hidden and cannot be accessed by
 Data may communicate with each other through external functions
functions  Objects may communicate with each other
 Languages: C, Fortran, Pascal, etc through functions
 Languages: C++, JAVA, Python, etc

You might also like