Object Oriented Programming Methodology - May 2014
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) Write a reurssive method to calculate factorial of a integer number.(5 marks) 1 (b) Explain Bit-wise operators available in JAVA with example.(5 marks) 1 (c) Explain how JAVA is platform - independent.(5 marks) 1 (d) Write a program to find the largest of the three integers accepted from command line.(5 marks) 2 (a) Write a detailed note on System.arraycopy().(5 marks) 2 (b) Write a program to display following pattern :-
1 0 1
0 1 0 1
(5 marks) 2 (c) Explain different types of inheritance with example.(10 marks) 3 (a) With proper example explain the steps to create a package and add a class or interface.(5 marks) 3 (b) Explain Thread life cycle.(5 marks) 3 (c) Write a program in JAVA to accept the values of a,b,c and d. calculate and display ((a x d) + (b x c))/(b x d). Create user defined exception to display proper message when value of (b x d) is ZERO.(10 marks) 4 (a) What is Vector? Explain any five methods of vector.(5 marks) 4 (b) Explain what are abstract class and abstract methods.(5 marks) 4 (c) Write a program to find largest and second largest element of an array.(10 marks) 5 (a) Explain method overloading and method overriding with suitable example.(10 marks) 5 (b) Write a program to accept a number from command line and to check whether it is Amstrong Number or Not.(10 marks)
Write short notes on (any four) :-
6 (a) Wrapper classes.(5 marks) 6 (b) Life cycle of Applet(5 marks) 6 (c) Static members(5 marks) 6 (d) Thread synchronization(5 marks) 6 (e) Exception handling mechanism.(5 marks)