0% found this document useful (0 votes)
24 views2 pages

CS-72 June 2011

The document contains instructions and questions for a C++ and Object Oriented Programming exam. It includes the following: 1) A compulsory question to define an Account class with data members like name, account number, type and balance, and member functions to assign values, deposit, withdraw and display balance and test it for 10 customers. 2) Other questions ask to differentiate between procedural and OOP, data encapsulation and inheritance, explain friend functions and exception handling, polymorphism, scope resolution operator, virtual base classes, inline functions and operator overloading. 3) The last question requires explanation of input/output streams, constructors/destructors, abstract classes and preprocessor directives with examples.

Uploaded by

Nitesh Bhardwaj
Copyright
© Attribution Non-Commercial (BY-NC)
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)
24 views2 pages

CS-72 June 2011

The document contains instructions and questions for a C++ and Object Oriented Programming exam. It includes the following: 1) A compulsory question to define an Account class with data members like name, account number, type and balance, and member functions to assign values, deposit, withdraw and display balance and test it for 10 customers. 2) Other questions ask to differentiate between procedural and OOP, data encapsulation and inheritance, explain friend functions and exception handling, polymorphism, scope resolution operator, virtual base classes, inline functions and operator overloading. 3) The last question requires explanation of input/output streams, constructors/destructors, abstract classes and preprocessor directives with examples.

Uploaded by

Nitesh Bhardwaj
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

No.

of Printed Pages : 2

CS-72

N .14

BACHELOR IN COMPUTER APPLICATIONS Term-End Examination June, 2011 CS-72 : C++ AND OBJECT ORIENTED PROGRAMMING

Time : 2 hours Questions from the rest. 1.

Maximum Marks : 60

Note : Question number 1 is compulsory. Answer any three

(a) Define a class ACCOUNT that includes 10 following members : Data Members : Name of Depositor, Account no., Type of A/c, Balance Amount. Member functions : To assign initial values, deposit amount, withdraw after checking balance, To display name and balance. Write a program in C++ and test it for 10 Customers. (b) Differentiate between : (i) (ii) Procedural Programming and Object Oriented Programming. Data Encapsulation and Inheritance. 5 10

(c) Explain the utility of the friend function, using an appropriate example. CS-72 1

P.T.O.

(d) Explain the steps involved in drawing interaction diagram with the help of an example. 2. (a) What do you mean by exception Handling ? Write a C++ Program that throws an arithmetic exception whenever the Input number is less than zero. (b) What do you mean by Polymorphism ? Explain with an example. (a) How do you use scope resolution operator for accessing global variables ? Also discuss its other uses. (b) What is a Virtual Base Class ? Explain with an example. (a) What is an inline function ? Explain with an example and also discuss its limitations. (b) Define operator overloading. Explain its advantages. Explain the following with examples : (a) Input and Output streams (b) Constructor and Destructor (c) Abstract classes (d) Preprocessor directives

3.

4.

5 5

5.

2x5=10

CS-72

You might also like