MCA (Semester - 5) : Instruction To Candidates: 1) 2) Section - A
MCA (Semester - 5) : Instruction To Candidates: 1) 2) Section - A
J-3697[S-1553] [2037]
MCA (Semester - 5th)
JAVA PROGRAMMING (MCA - 502)
Instruction to Candidates:
1) Section-A is compulsory.
2) Attempt any Nine questions from Section-B.
Section - A
(15 x 2= 30)
Q1)
a) What is meant by daemon thread? In java runtime, what is its role?
b) How does one compute the class of an IP address? What range determines
the class C IP address?
c) With reference to java graphics, explain the terms: a listener and an event.
d) What are the disadvantages of only allowing I/O via widgets such as
checkboxes, buttons or small text areas?
h) Explain the meanings of the operators / and % when they are applied to
integer values.
i) Java has five control statements: if, while, do... while, for, and switch.
However, it really only needs two of these. What does this mean? Why is
it true?
P.T.O.
j) In the Java programming language, what is a package, and why do
packages exist.
k) The main subroutine of a program begins with the line public static void
main (String[] args). What does the word “public” mean here, and why
is it necessary?
l) You are creating a JPanel to hold five JButtons. You can choose between
using the default. FlowLayout on the panel, or using a GridLayout instead.
What’s the difference? Exactly what effect will your choice have?
Section - B
(9 x 5 = 45)
Q2) What are the three OOPs principles and define them?
Q3) Explain the two ways of creating a thread in Java and the role of the start, run
and stop methods.
Q4) Explain Listeners and Events with reference to Java SWING components.
What type of event does the Java Mpuse Motion Listener Interface report?
Describe two types of application that might use it?
J-3697[S-1553] 2
Q5) The event-driven style of programming that is used in GUI programs is very
different from the scripted, step-by-step programming that is often used for
command-line applications. Discuss event-driven programs and how they relate
to object-oriented programming.
Q6) It is known that ‘The socket API is available for many operating systems,
including systems used on personal computers (e.g. Microsoft’s Windows
systems) as well as various UNIX systems (e.g. Sun Microsystems’ Solaris)’.
Explain what a socket is and briefly explain how information can pass between
a client and a server with respect to the direction of information flow and the
required protocol information.
Q9) What is the difference between the File and Random Access File classes?
Explain by taking examples.
Q11)How do you invoke a Java Servelt? What is the difference between doPost()
and doGet() methods? What are the parameters of the service() method?
Q13)What is inheritance? Explain how you can inherit a class into another class in
Java with the help of a program.
ÑÑÑ
J-3697[S-1553] 3