undefined  
DR. BABASAHEB AMBEDKAR TECHNOLOGICAL  
UNIVERSITY, LONERE RAIGAD -402 103  
Semester Examination Summer - 2019  
Branch: Computer Science & Engineering  
Subject with Subject Code:- OOP in Java (BTCOE404A)  
Date:-22/05/19  
Sem.:-IV  
Marks:60  
Time:- 3 Hr.  
Instructions to the Students  
1
2
3
4
. Each Question carries 12 marks.  
. Attempt any Five Questions of the following.  
. Illustrate your answers with neat sketches, diagram etc., wherever necessary.  
. If some part or parameter is noticed to be missing, you may appropriately assume it  
and should mention it clearly.  
_
_______________________________________________________________  
Q.1. All Questions are Compulsory:  
(04*03=12)  
a) Differentiate between OOP and POP.  
b) Write a program to find largest number using multiple if statements.  
c) List different operators in JAVA and explain any two of them.  
Q.2.Attempt any two Questions:  
(06*02=12)  
a) Which are the members of a class? Explain their role in class definition. Explain  
with suitable example.  
b) Create class Account to provide a method called debit that withdraws money from  
an Account.Ensure that the debit amount does not exceed the Account’s balance. If  
it does, then the balance should be left unchanged and the method should print a  
message indicating "Debit amount exceeded account balance." Modify class  
AccountTest to testmethod debit.  
c) What is a default constructor? How are an object’s instance variables initialized if a  
class has only a default constructor? Explain with example.  
Q.3. Attempt any two Questions:  
(06*02=12)  
a) Explain counter-controlled repetition and sentinel-controlled repetition.  
b) Explain break and continue statements with example.  
c) List the selection structure statements and explain any one of them with example.  
A10D47D351C36413541E38D9427A4C23  
undefined  
Q.4.Attempt any two Questions:  
(06*02=12)  
a) How to declare and create array in JAVA? How to pass an array to method?  
Explain with example.  
b) Write statements that perform the following one-dimensional-array operations:  
i) Set the 10 elements of integer array counts to zero.  
ii) Add one to each of the 15 elements of integer array bonus.  
Iii) Display the five values of integer array best Scores in column format.  
c) Write program in java, create two dimension array to store grades of 7 subjects of  
1
0 students of a batch. Find the lowest, highest and average grade of batch.  
Q.5.Attempt any two Questions: (06*02=12)  
a) List and explain different methods of class Arrays. Also show a simple example  
program on it.  
b) Explain the use of overloaded constructors with example.  
c) Write a program to find multiplication of two matrices.  
Q.6.All Questions are Compulsory:  
(04*03=12)  
a) What is inheritance? What is its necessity? Explain with example.  
b) What is the concept of polymorphism? Explain its need in OOP.  
Explain with example.  
c) Explain relationship between Superclasses and Subclasses with example.  
A10D47D351C36413541E38D9427A4C23