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