We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Roll No.
(36) 7442
Printed Pages—4] 5BCA3
Bachelor of Computer Application (Fifth Semester)
Examination, Dec. 2018/Jan. 2019
PROGRAMMING WITH JAVA
saafi/Duration : 3 42/Hours) (yf/Max. Marks : 80
(an sife/Min. Pass Marks : 32
Fret:
1 wewa uta sed # fair @1 vere ged A arate famed fe wa @
2 wis gee a ue oe wa df) we owen ae Ue wei # om df
3 wat we & fae war sie fat 1
4. set crear ose STR Ser AAT wT TEM
ee
6 we 4 ater falta em ow oar ta qa sifea Ft)
Instructions :
1. ‘The Question Paper is divided in five Units. Each unit carries an internal
choice.
2 Attempt one question from each Unit. Thus attempt five questions in all.
All questions carry equal marks.
4. Assume suitable data wherever necessary.
5. English version should be deemed to be correct in case of any anomaly in
translation.
6 Candidate should write his/her Roll Number at the prescribed space on the
question paper.
P.T.O.
httpyAwmw.mcubhopal.com7442
(a)
(b)
(a)
()
(a)
(b)
(a)
(b)
(ars VUnit D
war wr C++ A aaa aa ae er? 8
What are the similarities and differences between JAVA and C++ ?
Interfaces 1 € ? 8
What are Interfaces ?
(#aqavOr)
‘wrat @i “write once, run anywhere” Wa St we Fi VAT wT ze 2 8
What Java is known as “write once, run anywhere” language ?
FUR fafa Soar aaa ven ren Fife far we rar Fara Tat 1 8
Name and explain four methods every Java class will have
(garg IWUnit I)
fr OOP afeafis waract at omen aifsm : 8
Explain the following OOP terminologies
w@ Data Abstraction
(i) Inheritance.
weiner em @ 2 uictatiese fronian 7 $a afigis ect @ 2 8
What is Polymorphism ? How does polymorphism promote extensibility ?
(31aavOr)
wa Ho ueiva weft Ha wea zt ont @ ? 8
How multiple inheritance is achieved in Java ?
vem fda pA 4 dassA am @t aera at ata dif acre A dt ofere err
Fees a we b Gi ae TH TRA Aas compute) eit oa aa FeTA—classB,
classC 7 class) 443 pB, pC TH pD 4, a afenfaa etfs were ace
classA #1 Baga & Tt compute() Fe F implement eit! classB Fa Fa
b @ eth sum ft wT FH, classC H, stew a dar b FT sifse va
classD 4 subtraction # Woy wt ern Fife) sa THE sat sr farean st
wer Fare H call to the compute() #t 7H Se 8
2
httpyAwmw.mcubhopal.com7442
Define a class named classA in a package pA. This class will contain two
public data member a and b and an abstract method compute(). Now
define three classes named classB, classC and classD in packages pB, pC
and pD. Each of the class is a subclass of classA and will implement the
compute() method. In classB, it will compute eth sum of a and b, in
classC, compute the product of a and b and in classD, compute the result,
of subtraction, Now write a Java program that will generate call to the
compute) method of each cl
(garg W/Unit WD)
(a) Vector 7 Array % aa aaa eet A cree aaa! 8
What is the difference between a Vector and an Array ? Discuss the
advantages and disadvantages of both.
(b) Early binding, late binding 74 dynamic binding (a1 srafr Fae fects)
me? 8
What is early binding, late binding and dynamic binding (or dynamic
method dispatch) ?
(3travOr)
Tee wan ate amie fate sh state a eye Ser A oie (oan) dena at
Soh am war Sac fron deme aT summation wa sire ae TAYE UR AIT
dem %, d ame Fe Siz FF user-defined exception @ FCI fet! main() Fs
i FA exception # €a HET Afea WN error message fie FifsT! 6
Write a Java code segment that will take a sequence of positive integer
numbers as input from the keyboard and find the summation of the odd numbers
only. If the input is a negative number, your code segment should throw a user-
defined exception. The main() method should handle this exception and print
the error m
age.
3 P.T.O.
httpyAwmw.mcubhopal.com10,
7442
(a)
()
(a)
()
(a)
()
(a)
()
(garg IV/Unit IV)
ver wit are free oH, are A afigis een aa seeks at antes oT
A oe aaa aa wes da er? 8
Discuss the differences between creating a new class, extending a class
and implementing an interface; and when each would be appropriate
Serializable Interface #1 @ ? 8
What is Serializable Interface ?
(aqavOr)
Process #41 Threads 4 ea sw @ ? 8
What is the difference between Process and Threads ?
4 at a faftrat @, frre gro threads #1 te oT aa & 2? a far a
aia aeifsre | 8
What are the fo methods by which threads can be stopped ? Describe
these methods.
(gare V/Unit V)
Application 741 Applet 4 aR aaET! 8
Differentiate between Application and Applet.
Exception fra war tea feat via & 7 8
How an exception is handled ?
(straWvOr)
Applet tag 4 faeaa at ef @1 ee constituents Ft aren Ff 8
Given the syntax of Applet tag. Explain its constituents.
srt sew F eI HTML @ applet add #a % aa (ae) feafani 8
Write steps to add applet to HTML file, using suitable example.
httpyAwmw.mcubhopal.com