0% found this document useful (0 votes)
4 views

Basic concepts of OOP

Uploaded by

rafaath.mk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Basic concepts of OOP

Uploaded by

rafaath.mk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BASIC CONCEPTS OF OOP

One mark questions:


1. What is the fundamental idea of object oriented programming?
Using classes and objects
2. What is an object?
Object represents data and associated functions as a singleunit.
3. Define the term class.
A class is a way of grouping objects having similar characteristics.
4. Define the term data abstraction
Abstraction refers to the representation of essential featuresof an object without including background
details.
5. What is encapsulation?
It is a way of combining data and associated functionsinto a single unit.
6. What is meant by function overloading?
Two or more functions have same name ,but differ in the number of arguments or data type of arguments.
7. Define polymorphism
It is ability of a function to have same name and multipleforms.
8. What is inheritance?
Process of creating new classes using the properties of existing class.
9. What is a base class?
The class that provides its properties to create new class
10. What is a derived class?
The class that inherits the properties from another class
11. How are base class and derived class related?
Through Inheritance
12. Define the term data hiding
Process of preventing unauthorized users from accessing data
Two marks questions:
1. What is the significance of classes in OOP?
Class is a outline from which objects are created. It represents all the information about an object. It is easy
for the programmer to design the objects.
2. What is the difference between program module and an object?
Module is a small part of the program (function)
Object represents data and associated functions as a single unit.
Module represents a function.
Object represents many functions
3. Mention different types of inheritance.
Single, Multiple, Multilevel, Hybrid and Hierarchical.
Three mark questions
1. Briefly discuss the classes and objects.
Class is a outline from which objects are created. Using classes any number of objects can be created.
Objects represent a person, place or table of data. Every object must be a member of a particular class.
2. Explain inheritance
concept of inheritance provides theidea of reusability. Process of forming a new
class from an existing class is known asInheritance.
3. Write short notes on polymorphism.
.The ability of an operator and function to take multiple forms is known aspolymorphism. 2 types of
polymorphism is
Function overloading: 2 or more functions have same name but differ in the number of arguments and data
type of arguments.
Operator overloading: Same operator used for doing various operations with different data items.
4. Mention any 4 high level languages that follow object oriented
programming approach
object oriented programminglanguages are C ++, Java, C #, Python, PHP.
Five marks answer questions
1. Write the differences between procedural programming and object
oriented programming
Procedural OOP
Program is divided into small parts called functions Program is divided into parts called objects
Importance is given to functions and not to data Importance is given to data and not to functions or
procedures
It follows top down approach It follows bottom up approach
It does not have access specifiers It has access specifiers
Overloading is not possible Overloading is possible
It does not have facility for hiding data It has ability to hide data

2. Explain advantages OOPs


• Programs are modularized based on the principle of classes and objects.
• Linking code & object allows related objects to share common code. This reduces code duplication
and code reusability.
• Data is encapsulated along with functions, providing data security.
• Easier to develop complex software, because complexity can be minimized through inheritance.
• The concept of data abstraction separates object specification and object implementation.
• Creation and implementation of OOP code is easy and reduces software development time.
• OOP can communicate through message passing
3. Write the disadvantages of object oriented programming
• OOP software is not having set standards.
• The classes are overly generalized
• The adaptability of flow diagrams and object oriented programming using classes and objects is a
complex process.
• To convert a real world problem into an object oriented model is difficult.

4. Write the real life applications of object oriented programming.


• Computer graphic applications
• CAD/CAM software
• Object –oriented Database
• User Interface design such as windows
• Real-time systems
• Simulation and Modeling
• Artificial intelligence and expert systems

You might also like