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)
Time:- 3 Hr.
Instructions to the Students
. 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:
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:
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:
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.