You can Download Chapter 6 Basic Concepts of OOP Questions and Answers, Notes, 2nd PUC Computer Science Question Bank with Answers Karnataka State Board Solutions help you to revise complete Syllabus and score more marks in your examinations.

Karnataka 2nd PUC Computer Science Question Bank Chapter 6 Basic Concepts of OOP

2nd PUC Computer Science Basic Concepts of OOP One Mark Questions and Answers

Question 1.
What is the fundamental idea of object oriented programming?
Answer:
Object-oriented programming (OOP) is a programming language model organized around “objects” rather than “actions” and data rather than logic of the program.

Question 2.
What is an object?
Answer:
An object is a combination of code and data that can be treated as a unit. An object can be considered any real time entity (existing thing) that can perform a set of related activities.

Question 3.
Define the term class.
Answer:
The class is a collection of objects that have the similar properties and common behaviour.

Question 4.
Define the term data abstraction.
Answer:
The process of hiding the representation of various data items and implementation details of a function from the user program is called data abstraction.

KSEEB Solutions

Question 5.
What is encapsulation?
Answer:
It is the method of combining the data, attributes and methods in the same entity is called encapsulation.

Question 6.
What is meant by function overloading?
Answer:
Two or more functions with the same name is called function overloading.

Question 7.
Define polymorphism.
Answer:
Polymorphism is a Greek word that means Many Shapes. In OQP Polymorphism means the ability to take on many forms. The term is applied both to objects and to functions.

Question 8.
What is inheritance?
Answer:
Inheritance is the process by which new objects can acquire the properties of an existing objects of other class.

Question 9.
What is a base class?
Answer:
A base class is a class, in an object-oriented programming language, from which other classes are derived.

Question 10.
What is a derived class?
Answer:
A derived class is a class created or derived from another existing class.

Question 11.
How are base class and derived class related?
Answer:
The hierarchical relationship between derived class and base class is known as an “is a” relationship.

Question 12.
Define the term data hiding.
Answer:
Data Hiding is the mechanism where the details of the class are hidden from the user.

Question 13.
What do you mean by dynamic binding?
Answer:
It means code associated with a procedure call is known only at the time of execution of program. It is the process of connected one program block to another.

KSEEB Solutions

Question 14.
What is message passing?
Answer:
It is the process of specifying the name of objects, name of the function and the information to be sent.

Question 15.
Mention the two types of overloading.
Answer:
The two types of overloading is operator overloading and function overloading.

2nd PUC Computer Science Basic Concepts of OOP Two Marks Questions and Answers

Question 1.
What is the significance of classes in OOP?
Answer:
The Class allow to group functions and data variables. The class is a way to grouping objects having similar characteristics. The objects can be made user defined data type with the help of a class.

Question 2.
What is the difference between program module and an object?
Answer:
A program module is a self-contained independent program segment only it does not provide security to data whereas an object is a collection of data members and member functions that operate on data and data is provided with security.

Question 3.
Mention different types of inheritance.
Answer:
The different types of inheritance are single inheritance, multilevel inheritance, multiple inheritance, hierarchical inheritance and hybrid inheritance.

Question 4.
Mention any two advantages of object oriented programming over earlier programming methods.
Answer:

  1. OOP provides useful features like Inheritance, polymorphism and encapsulation, not available in earlier programming methods.
  2. Once an Object is created, knowledge of its implementation is not necessary for its use. In older programs, coders needed understand the details of a piece of code before using it in this or another program.

Question 5.
Explain the structure of object.
Answer:
The object is a collection of data members and member function. Objects occupy space in memory and have address associated with them. Objects interact by sending messages to one another.

KSEEB Solutions

Question 6.
Explain data encapsulation.
Answer:
The data encapsulation is a technique that combines data and functions into a single unit called class. Here, data can be accessed through member function only present inside the class. Data encapsulation enables data hiding or information hiding.

2nd PUC Computer Science Basic Concepts of OOP Three Marks Questions and Answers

Question 1.
Briefly discuss the classes and objects.
Answer:
A class is a definition of an object. It is data type just like int. A class is a type, and an object of this class is just like a variable. In other words, class is a blue print and object can be considered as any real time entity (existing thing) that can perform a set of related activities.

Question 2.
Explain inheritance.
Answer:
Inheritance is the process of creating new classes, called derived class, from existing or base classes. The derived class inherits all the capabilities of the base class. Using Inheritance some qualities of the base classes are added to the newly derived class, apart from its own features. Inheritance permits code reusability.

KSEEB Solutions

Question 3.
Write short notes on polymorphism.
Answer:
The polymorphism is ability of an object to take more than one form in different instances. For example, one function name can be used for different purposes. Similarly, same operator can be used for different operations. There are of two types one is the “compile time polymorphism” and other one is the “run-time polymorphism”.

Question 4.
Mention any 4 high level languages that follow object oriented programming approach.
Answer:
The four high level languages that follow object oriented programming approach are

  • C++
  • C#
  • Java
  • Python
  • Visual Basic

2nd PUC Computer Science Basic Concepts of OOP Five Mark Questions and Answers

Question 1.
Write the differences between procedural programming and object oriented programming.
Answer:
Difference between Procedure Oriented Programming (POP) & Object Oriented Programming (OOP)

Procedure Oriented Programming Object Oriented Programming
In POP, program is divided into small parts called functions. In OOP, program is divided into parts called objects.
In POP, Importance is not given to data but to functions as well as sequence of actions to be done. In OOP, Importance is given to the data rather than procedures or functions.
POP follows Top Down approach. OOP follows Bottom Up approach.
POP does not have any access specifier. OOP has access specifiers named Public, Private, Protected, etc.
In POP, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions.
To add new data and function in POP is not so easy. OOP provides an easy way to add new data and function.
POP does not have any proper way for hiding data so it is less secure. OOP provides Data Hiding so provides more security.
In POP, Overloading is not possible. In OOP, overloading is possible in the form of Function Overloading and Operator Overloading.’

Question 2.
Explain advantages of OOPs.
Answer:

  1. OOP provides a dear modular structure for programs. Large problems can be reduced to smaller and more manageable problems.
  2. In OOP, data can be made private to a class such that only member functions of the class can access the data. This principle of data hiding helps the programmer to build a secure program.
  3. Implementation details are hidden from other modules and other modules has a clearly defined interface.
  4. It is easy to maintain and modify existing code as new objects can be created with small differences to existing ones.
  5. With the help of polymorphism, the same function or same operator can be used for different purposes. This helps to manage software complexity easily.
  6. In OOP, programmer not only defines data types but also deals with operations applied for data structures.
  7. It is easy to model a real system as real objects are represented by programming objects in OOP.
  8. With the help of inheritance, we can reuse the existing class to derive a new class such that the repetition of code is eliminated and the use of existing class is ex¬tended. This saves time and cost of program.

KSEEB Solutions

Question 3.
Write the disadvantages of object oriented programming.
Answer:
The few dis-advantages of OOP are
1. Size:
Object Oriented programs are much larger than other programs. In the early days of computing, space on hard drives, floppy drives and in memory was at a premium. Today we do not have these restrictions.

2. Effort:
Object Oriented programs require a lot of work to create. Specifically, a great deal of planning goes into an object oriented program well before a single piece of code is ever written. Initially, this early effort was felt by many to be a waste of time. In addition, because the programs were larger (see above) coders spent more time actually writing the program.

3. Speed:
Object Oriented programs are slower than other programs, partially because of their size. Other aspects of Object Oriented Programs also demand more system resources, thus slowing the program down.

4. Not suitable for all types of problems:
There are problems that lend themselves well to functional-programming style, logic -programming style, or procedure-based programming style, and applying object-oriented programming in those situations will not result in efficient programs.

5. Not all programs can be modeled accurately by the objects model. If you just want to read in some data, do something simple to.it and write it back out, you have no need to define classes and objects. However, in some OOP languages, you may have to perform this extra step.

6. The objects often require extensive documentation.

Question 4.
Write the real life applications of object oriented programming.
Answer:
Some of the real life applications of object oriented programming are given below;

  • 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.

Leave a Reply

Your email address will not be published. Required fields are marked *