0
1.4kviews
Object Oriented Programming Methodology : Question Paper May 2012 - Computer Engineering (Semester 3) | Mumbai University (MU)
1 Answer
0
9views

Object Oriented Programming Methodology - May 2012

Computer Engineering (Semester 3)

TOTAL MARKS: 80
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any three from the remaining questions.
(3) Assume data if required.
(4) Figures to the right indicate full marks.
1(a) Explain the significance of keywords 'public', 'static' and void', in the main method of a java application program. (5 marks) 1(b) Explain the structure of Java Virtual Machine. (5 marks) 1(c) Write a program to evaluate sum of following series:
1+1/x+1/x2 +1/x3 + ...+1/xn
Take value of x and n as non zero- positive integers from user.
(10 marks)
2(a) Write a program to replace all the occurrences of a particular character in a line of text, with a new character. Take the input line and the two characters as a user input. For example if the text line is: keep our city cleanThe character 'e' to be replaced with '#' then the output is: k##p our city cl#an. (10 marks) 2(b) Write an interactive program to create a Vector object and populate it with names of cities. Program should display and implement following menu choices:
i) Add city - if city name already exists in the Vector then program should display appropriate message
ii) Remove city ? if city does not exist in Vector then program should display appropriate message
iii) Display all- should display entire Vector content
(10 marks)
3(a) Assume a Bank maintains two kinds of accounts for its customers. One called savings account and the other current account. The savings account interest rate is 5% per year and for current account there is no interest. Saving account should hold a minimum balance but there is no restriction on current account. Create an abstract class called Account that stores customer name, account number. Derive savings and current account classes from the Account class and add specific attributes to each of the derived classes. Write an interactive program to create specific type of account and it should follow following functionality:
1. Accept Deposit and update balance
2. Compute and Deposit interest
3. Permit withdraw and update balance.
(20 marks)
4(a) What is an Exception? Explain exception handling in java with suitable examples.(10 marks) 4(b) Write applet program to display a circle, line and an Arc inside applet?s visible area. (10 marks) 5(a) What are packages in java? With example show how to create package in java and add classes to it.(10 marks) 5(b) Each post-paid telephone connection object stores its telephone-number, customer-name and address. The telephone company wants to keep a tab of how many post paid connections have been sold. Write a program to implement the above requirement and display total post-paid connections sold by the company. What additions will have to be made in post-paid telephone connection object to make above possible?(10 marks) 6(a) What is Multithreading? Explain thread life Cycle? (10 marks) 6(b) The mains voltage supplied by a sub-station is measured at hourly interval for 72 hours. Write a program to display the following:
i. The recorded voltage for 72 hours
ii. the hours (numbered 1 to 72) at which the recorded voltage varies from the mean by more than 10%
(10 marks)
7(a) Concept of streams in java and stream classes. (10 marks) 7(b) Difference between Abstract class and interface. (10 marks) 7(c) Applet life cycle (10 marks)

Please log in to add an answer.