RGPV Question Papers BE Object Oriented Programming Methodology 3rd Sem June 2004

 RGPV Question Papers

BE Object Oriented Programming Methodology 3rd Sem June 2004

Note:  Solve any five questions.

1.  (a) What do you mean by dynamic binding ? How is it useful in OOP?

(b) How does object- oriented approach differ from object based approach?

(c)   How does an inline function differ from a preprocessor macro?

(d) What is a class? Hoe does it accomplish data hiding?

2.  (a) What is a constructor ? Is it mandatory to use constructors in a class?

(b) What do you mean by dynamic initialization of objects? Why do we need to do this?

(c)  What is containership? How does it differ from inheritance?

(d)  How is polymorphism achieved at

(i) Compile time (II) Run time

3. (a)  Describe briefly the features of  I/o system supported by C++.

(b)  What is prototyping? How does it help to improve the system design?

(c)  What is file Mode? Describe the various file mode options available.

(d)  Discuss the different ways by which we can access public number function of an object.

4.       Write a c++ program for a bank maintence to kinds of accounts for customers, one called as saving

Account and the other as current account. The saving account provides compound interest and

Withdrawal facilities but no cheque facilities. The current account provides cheque books facilities but no interest. Current account holder should also maintain a minimum balance and if the balance falls below this level, a services charge is imposed. Create a class account, that stores customers name, account number and type of account. From this drive the classes’ cur-acct and save-acct to make them more specific to there requirements .Includes necessary number function in order to achieve the following task:

(i) Accept deposit from a customer and update the balance

(ii) Display the balance

(iii) Compute and deposit interest

(iv) Permit withdrawal and update the balance.

(v) Check for the minimum balance, impose penalty, if necessary and update the balance.

Do not use any connectors . Use member functions to initialize the class member.

5.  (a) prepare an object model to describe undirected graphs . An undirected graph consists of a set of vertices and a set of edges. Edges connect pairs of vertices. Your model should chapter only the structure of graphs (i.e.conectivity) a need not to be concerned with the geometrical retail such as location of vertices or length of edges. A typical graph is shown below:

(b) Prepare an instance diagram for figure.

 

6. (a) A directory file contents information about file in a directory, including both ordinary files as well as other dire cry files .Prepare an object diagram which models directory files and ordinary files . Sins admirer plus a file name uniquely identifies a file, you will probably won’t to us file name as qualifier.

(b)Prepare a data flow diagram for computing the volume and surface area of a cylinder. Inputs are the height and radius of the cylinder. Output is volume and surface area. Discuss several ways of in printing the data flow diagram.

7.    Write code, including class declarations and methods, to implements the following using pointers in any object oriented language:

(i) One -to -one association which is traversed in both directions.

(ii)  One- to -many the association which is traversed in the direction from one-to – many the association is considered unordered.

(iii)     (ii)  One- to -many  the association which is traversed in the direction from one-to – many the association is considered ordered .

(iv) Many-to-many association which is traversed in both directions.

The association is considered ordered in one direction, and unordered in the other direction.

8.  Write short notes of any four of the following:

(i)   Multiple inheritances

(ii) Data persistence                 (iii) Reusability

(iv) Aggregation verses generalization

(v) Links and Association

 

Leave a Comment