11. (a) Explain the following concepts Object Oriented Programming:
(i) Data abstraction
(ii) Inheritance
(iii) Polymorphism and
(iv) Objects in detail with an example (16)
(Or)
(b) (i) List out any five merits of Object Oriented methodology.
(b) (ii) Compare and contrast the following Control structures with example :
if …… else statement & switch statement and
do …… while & the while statement. (16)
12. (a) Write a program to overload = operator .Assign values of data members of one object to another object of the same type. (16)
(Or)
(b) Write a C++ program using inheritance to implement the following
A newspaper agent pays two variant rates for the delivery of newspapers. A delivery boy can earn Rs.2 on a morning delivery but only Rs. 1.50 on an evening delivery. Boys are salaried either for a morning delivery or for an evening paper round but not for both. Read (input) the code for round (0 for morning and 1 for evening) and the number of total papers rounds in one week done by a boy and compute his earnings and display it.
13. (a) Write a program to write and read data in a file using object I/O functions write() and read (). Declare class with data members name [20],int billno,int amount_debited and int received_amount and int balance.Add 10 records and display the list of person with balances.The user should have a facility to modify the existing records (16)
(Or)
(b) (i) Describe the various file modes and its syntax (6)
(ii) Discuss the need for exception with try, catch and throw keywords (10)
14. (a). Write short notes on the following:
final class, abstract class, modifier final, inner classes (16)
(Or)
(b) (i) State the rules for creating an identifier in Java (16)
15. (a) Discuss how interface is implemented in Java with an example. (16)
(Or)
(b) What is a thread? State how synchronization is dealt while using
multithreading . (16)
|