Friday, May 16, 2014

OBJECT ORIENTED PROGRAMMING METHODOLOGY (OOPM),B.E. Computer Science (CS), Semester 3, December 2013.

OBJECT ORIENTED PROGRAMMING METHODOLOGY (OOPM),

B.E. Computer Science (CS), Semester 3, December 2013.
Con. 9983-13
GX-12209
(3 Hours)
[Total Mark : 80]

N. B.: (1) Question no 1 is compulsory.
(2) Attempt any three from remaining.

1. (a) Write a Program in Java to find nCr and nPr. --- (5Marks)

(b) What are the applications of wrapper classes? Explain. --- (5 Marks)

(c) Write an applet program to draw circle rectangle and line. --- (5 Marks)

(d) Write a detail note on System . arraycopy ( ) . --- (5 Marks)

2. (a) Assume that a bank maintains two kind 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 chequebook facility. The current account provides cheque book facility but no interest. Current account holder should also maintain a minimum balance falls below this level, a service charge is imposed. --- (8 Marks)
Class account stores customer name, account number, and the type of account. Include member functions:-
  • Account deposit from a customer and update the balance.
  • Display the balance.
  • Compute and deposit interest.
  • Permit withdrawal and update balance.
  • Check for minimum balance, impose penalty and update the balance.
Draw class diagram for above scenario.

(b) For above problem statement, implement class account, current account and saving account. --- (8 Marks)

(c) Exam association and aggregation with suitable example. --- (4 Marks)

3. (a) Write a program to display area of square and rectangle . Make use of interface to define templates of methods to be there in the derive classes. --- (10 Marks)

(b) With the help of suitable example explain multithreading in terms of following:- ---(10 Marks)
  1. Creating threads, extending the thread class.
  2. Life – cycle of thread.
4. (a) Write a detailed note on exception handling in terms of following: - --- (10 Marks)
  1. Try – catch.
  2. Finally keyword.
  3. Cathing multiple exception .
  4. Throwing exception .
(b) Write a Java program to find out no. of uppercase and lowercase characters, blank spaces and digits and special characters from string. --- (10 Marks)

5. (a) Write an interactive program to create a vector object and populate it with names of cities. Program should display and implement following many choices: - --- (7 Marks)
  • Add city: If city name already exists in the vector then program should display appropriate message.
  • Remove city: If city does not exists in the vector then program should display appropriate message.
  • Display all: Should display contents of vector.
(b) Compare and contrast overriding method and overloading method with suitable examples. --- (8 Marks)

(c) Draw a sequence diagram that shows the interaction between caller, customer and credit card for the statement “Customer uses a credit card for doing the payment”. --- (5 Marks)

6. Write short notes on any four: - ---- (20 Marks)

(a) JVM

(b) Abstract methods and classes

(c) Method overloading

(d) Package.

(e) Static data, member and methods.

(f) Difference between C++ and Java

No comments:

Post a Comment