Basic Concepts of OOP
Basic Concepts of OOP
A. A class is a way of grouping objects having similar characteristics. Classes are user
defined data types. Once a class is defined, any number of objects of the class can be
created.
A. Objects are basic building blocks for designing programs. An object is a collection of
data members and associated member functions. Every object must be a member of
a particular class.
2. Explain inheritance.
A. The process of forming a new class from an existing class is known as Inheritance.
The existing class is known as base class. The new class is known as derived class. The
derived class shares some of the properties of the base class. In OOP, the concept of
inheritance provides the idea of reusability.
(2) Function overloading: Function overloading means two or more functions have
same name but differ in the number of arguments or data type of arguments.
4. Mention any 4 high level languages that follow object oriented programming
approach.
A. C++, Java, C#, Simula are the high level languages that follow object oriented
programming approach.
(2) Linking code and object allows related objects to share common code. This
reduces code duplication and enhances code reusability.
(3) Data is encapsulated along with functions. Therefore, external non-member
function cannot access or modify data, thus providing data security.
(5) The concept of data abstraction separates object specification and object
implementation.
(6) Creation and implementation of OOP code is easy and reduces software
development time.
(7) OOP can communicate through message passing which makes interface
description with outside system very simple.
(2) The adaptability of flow diagrams and object oriented programming using
classes and objects is a complex process
(3) To convert a real world problem into an object oriented model is difficult
4. Write the real life applications of object oriented programming. (any 5 points)