0% found this document useful (0 votes)
4 views2 pages

Java Programming Concepts and Exercises

The document is an examination paper for the Object Oriented Programming using Java course, covering various topics such as classes, constructors, event handling, applets, and AWT. It includes instructions on how to attempt the questions and is divided into three parts with specific questions for each part. The total marks for the exam are 100, and students are required to demonstrate their understanding of Java programming concepts through written responses and code examples.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Java Programming Concepts and Exercises

The document is an examination paper for the Object Oriented Programming using Java course, covering various topics such as classes, constructors, event handling, applets, and AWT. It includes instructions on how to attempt the questions and is divided into three parts with specific questions for each part. The total marks for the exam are 100, and students are required to demonstrate their understanding of Java programming concepts through written responses and code examples.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Paper'/ Subject Code: SE9132 / Object Oriented Programrnirrg Usiirg Jar a

sEg432

Total No. of Printed Pages: 2


S.E (Information Technology) (Semester-I\') EC 2019-ZO)

Object Oriented Progralnming using Java

[Time: 3:00Ilours] [Max. N{arks: 100]

Instructions: L Attempt tlvo questions fi'om Part-A, trvo questions from Parl-B aud one
lrorrr Pafl-C.
2. Figrrres to the right irtclicatc tnarks.
3. Makc suitablc assumptions u'hcrever ncccssary
PART A
Ql a. What are classes and objects? Horv are Classes and objccts creatcd in Java? (8)
Explain u ith syntax aud cxatnplc.
b. What is a constrllctor? Hori do u c invoke a constructor in Java (6)
c. String objccts arc irnnrutablc. Justily (6)

Q2 a. Why java is called platlorm indepcrrdcnt. (s)


b. Explain the different control flovu, statements available in Java. (8)
c. Design a class to represeut a bank account. Include the fullou,ing tnembers Data (7)
members: Depositor Name. Account number, Account fyp., Baiaircc Account
N{ethods: To assign initial [Link]. To deposit amount, To rvithdrarv amount after
clrccking balartcc, display ttamc attd balancc

Q3 Lr. Demonstrate the usc of a plramctcrizcd constructot' rvith the help of a java (5)
progranr
b. Write a java program to implement a calculator using switch statement (5)
c. Why multiple inheritance is not used in java. Justify rvith exarnple. (5)
d. List the diffcrence betrveen a class and an interface (5)

PART B
Q4 a. What do you mean by event handling in java? Explain the Delegation Evcnt (6)
Modcl.
b. With the help of Diagram explain the try and catch block rvorking. Wliat is the (8)
r"rse of keyrvord finally? Explain u,ith the help ofjava program

Explain the follorving controls ol AWT Frame (6)


a. Tcxr l'icld
b. Labcl
c. Butlou
Qs a. What are applets? Explain the life cycle of an applet. (6)
b. Distinguish between AWT and Sr,vings. (6)

cr3AD86AE27 C05F 27 3 57 15C28E3ED I A95


Paper / Subject Code: 589432 / Object Oriented Programming Using Java

sE9432

c. Write an AWT GUI application to adcl thc intcscr nuinbcr lrom tu,o text field (8)
and display the result as sirorvn belou,.

r ;&,l'JT l*lte$t*.. dr"dclrt*qn


=.";

{.-:.i'rt#r fi"*{F! l "l Lr rr1 t}.} r J'ttr'-


l;r!tri r {}{} s* rr.I f.}u rr"}i} e {

i &dd ii
iffrs*!: :. [Link]{I '&*. tu X.q}

Q6 a. Erplain the mcthods to create a frame using AWT r,vith the help of erample. (6)
b. What is exception? Hou,it is diffcrcnt from error? ts it possible to inciude yorr (8)
own exception in prograin? Explain u'ith suitable code for the puqtose
c. Explain u,ith block diagrarn the life cycle of tlread. (6)

PART C

Q7 a. What java Bcans? Givc its fcaturc.


is (s)
b. Explain the use oltluow stateulent rvith cxarnplc (s)
c. Cl'r'utc a pacl<agc "nn'Pacl<" for cluss "Calc" rvhicli defilrcs additiorr and (8)
mLrltiplication of trvo nutnbcrs. Use class "CalcDemo" to implement a calculator
rnakinr: usc of packagc rnyPack
(2)
d. Distinguish between class ancl interface

Q8 a. \\'hal is tlie role ol"super" kcyrvord? Explairr [Link] cx:rutplc. (6)


b. \\'rile a prosram to irnplcmcnt thrcad usins runLrtblc iutcr{acc. (6)
c. Write a java program to inrplernent above class diagram. (8)

I
"<lntelrfac*,,
shape I
t
.,,' --t
.....t....".,.1I

ft**l*rnglt*
:fi+d; i, i{ t it.::ill:,
i i.;***r* i

1" t
i-'i 1i rt,. !:. :.i !. \ .i i
t.....
tl i
li-":;.1.:":rl1t1:1.'r. l

CBAD86AE27 C 05r. 21 3 57 t-5C2 8E3ED I A95

You might also like