1 (a)
Write a program to calculate GCD of two numbers in JAVA.
5 M
1 (b)
Explain any three features of JAVA.
5 M
1 (c)
Draw and explain applet life cycle.
5 M
1 (d)
Explain wrapper class and its applications.
5 M
2 (a)
Write a program in JAVA to display following pattern. (Take input for number of rows from command line)
1 | |||
1 | 2 | ||
1 | 2 | 3 | |
1 | 2 | 3 | 4 |
5 M
2 (b)
Write a note on System.arraycopy().
5 M
2 (c)
Identify classes and their attributes and draw the relationships specified by following problems.
i) Bank maintains two kinds of accounts for customer, Saving accounts & current account. Saving account provides compound interest and withdrawal facility. Current account provides cheque book facility but no interest.
ii) Library maintains books and magazines. A student can issue a book or return a book. A fine is charged if book is returned after 8 days. The magazines are not issued, but student can read it in library.
i) Bank maintains two kinds of accounts for customer, Saving accounts & current account. Saving account provides compound interest and withdrawal facility. Current account provides cheque book facility but no interest.
ii) Library maintains books and magazines. A student can issue a book or return a book. A fine is charged if book is returned after 8 days. The magazines are not issued, but student can read it in library.
10 M
3 (a)
What is a package? Explain with example the steps to create package and add a class or an interface.
10 M
3 (b)
Write a program to create vector objects with student names. Program should perform following operations based on choice:
i) Add student name-To add new student name in the vector.
ii) Remove student name-Removes student name if already exists else display appropriate message.
iii) Display - Display contents of vector.
i) Add student name-To add new student name in the vector.
ii) Remove student name-Removes student name if already exists else display appropriate message.
iii) Display - Display contents of vector.
10 M
4 (a)
What is Exception? Explain how JAVA handles an Exception using following keywords:
try, catch, throw, throws & finally.
try, catch, throw, throws & finally.
10 M
4 (b)
Write a program to read and display details of ten Employees with following specifications:
Data Members: Emp_ID, Emp_name. Emp_Salary
Parameterized constructor to initialize data members of Employees and Member functions:
Display ()-to display information of all employees.
Data Members: Emp_ID, Emp_name. Emp_Salary
Parameterized constructor to initialize data members of Employees and Member functions:
Display ()-to display information of all employees.
10 M
5 (a)
With the help of suitable example explain how threads are created in JAVA.
5 M
5 (b)
Explain multiple inheritance in JAVA with example.
5 M
5 (c)
Write a program to count the number of alphabets, digits and special symbols from string.
10 M
Write short notes on (any four):
6 (a)
Method overloading & overriding
5 M
6 (b)
Static data members & methods
5 M
6 (c)
Abstract class & methods
5 M
6 (d)
Constructor & its type
5 M
6 (e)
JVM.
5 M
More question papers from Object Oriented Programming Methodology