You are here: Home > Computer Science CSE
All posts from

CS1204 Object Oriented Programming B.E Question Bank : niceindia.com

Name of the College : Noorul Islam College of Engineering
University : Anna University
Degree : B.E
Department : Computer Science and Engineering
Subject Code/Name : CS 1204 – Object Oriented Programming
Year : II
Semester : III
Document Type : Question Bank
Website : niceindia.com

Download :https://www.pdfquestion.in/uploads/ni…rogramming.pdf

NICE Object Oriented Programming Question Paper

Unit I

1. State the characteristics of procedure oriented programming :
** Emphasis is on algorithm.
** Large programs are divided into smaller programs called functions.
** Functions share global data.
** Data move openly around the system from function to function.
** Functions transform data from one form to another.
** Employs top-down approach in program design.

Related : Noorul Islam College of Engineering IT1352 Cryptography & Network Security B.E Question Bank : www.pdfquestion.in/2923.html

2. What are the features of Object Oriented Programming :
** Emphasis is on data rather than procedure.
** Programs are divided into objects.
** Data structures are designed such that they characterize the objects.
** Functions that operate on the data of an object are tied together.
** Data is hidden and cannot be accessed by external functions.
** Objects may communicate with each other through functions.
** New data and functions can easily be added whenever necessary.
** Follows bottom-up approach.

3. Distinguish between Procedure Oriented Programming and Object Oriented Programming :
Procedure Oriented Programming Object Oriented Programming :
** Emphasis is on algorithm.
** Large programs are divided into smaller programs called functions.
** Functions share global data.
** Data move openly around the system from function to function.
** Employs top-down approach in program design.
** Emphasis is on data rather than procedure.
** Programs are divided into objects.
** Functions that operate on the data of an object are tied together.
** Data is hidden and cannot be accessed by external functions.
** Follows bottom-up approach.

4. Define Object Oriented Programming (OOP) :
Object Oriented Programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand.

5. List out the basic concepts of Object Oriented Programming :
** Objects
** Classes
** Data Abstraction and Encapsulation
** Inheritance
** Polymorphism
** Dynamic Binding
** Message Passing

6. Define Objects :
Objects are the basic run time entities in an object oriented system. They are instance of a class. They may represent a person, a place etc that a program has to handle. They may also represent user-defined data. They contain both data and code.

7. Define Class :
Class is a collection of objects of similar data types. Class is a user-defined data type. The entire set of data and code of an object can be made a user defined type through a class.

8. Define Encapsulation and Data Hiding :
The wrapping up of data and functions into a single unit is known as data encapsulation. Here the data is not accessible to the outside world. The insulation of data from direct access by the program is called data hiding or information hiding.

9. Define Data Abstraction :
Abstraction refers to the act of representing the essential features without including the background details or explanations.

10. Define data members and member functions :
The attributes in the objects are known as data members because they hold the information. The functions that operate on these data are known as methods or member functions.

11. State Inheritance :
Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification and provides the idea of reusability. The class which is inherited is known as the base or super class and class which is newly derived is known as the derived or sub class.

12. State Polymorphism :
Polymorphism is an important concept of OOPs. Polymorphism means one name, multiple forms. It is the ability of a function or operator to take more than one form at different instances.

13. List and define the two types of Polymorphism :
** Operator Overloading – The process of making an operator to exhibit different behaviors at different instances.
** Function Overloading – Using a single function name to perform different types of tasks. The same function name can be used to handle different number and different types of arguments.

14. State Dynamic Binding :
Binding refers to the linking of procedure call to the code to be executed in response to the call. Dynamic Binding or Late Binding means that the code associated with a given procedure call is known only at the run-time.

15. Define Message Passing :
Objects communicate between each other by sending and receiving information known as messages. A message to an object is a request for execution of a procedure. Message passing involves specifying the name of the object, the name of the function and the information to be sent.

16. List out some of the benefits of OOP :
** Eliminate redundant code
** Saves development time and leads to higher productivity
** Helps to build secure programs
** Easy to partition work
** Small programs can be easily upgraded to large programs
** Software complexity can easily be managed

17. Define Object Based Programming language :
Object Based Programming is the style of programming that primarily supports encapsulation and object identity. Languages that support programming with objects are known as Object Based Programming languages. They do not support inheritance and dynamic binding.

UNIT II

1. State the difference between structures and class. By default the members of a structure are public whereas the members of a class are private.

2. Define a class.
A class is a way to bind the data and its function together. It allows the
data to be hidden from external use. The general form of a class is,
class class_name
{
private:
variable declarations;
function declaration;
public:
variable declarations;
function declaration;
};

3. List the access modes used within a class.
Private – The class members are private by default. The members declared private are completely hidden from the outside world. They can be accessed from only within the class.
Public – The class members declared public can be accessed from any where.
Protected – The class members declared protected can be access from within the class and also by the friend classes.

4. How can we access the class members?
The class members can be accessed only when an object is created to that class. They are accessed with the help of the object name and a dot operator. They can be accessed using the general format, Object_name.function_name (actual_arguments);

5. Where can we define member functions?
Member functions can be defined in two places:
Outside the class definition – The member functions can be defined outside the class definition with the help of the scope resolution operator.
The general format is given as, return_type class_name :: function_name (argument declaration)
{
function body
}

Leave a Reply

How to add comment : 1) Type your comment below. 2) Type your name. 3) Post comment.

www.pdfquestion.in © 2021

Contact Us   Privacy Policy   SiteMap