Pages

Wednesday, 5 April 2017

Java Solved Paper

NIELIT A Level Solve Paper

January-2013

A10.1-R4: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA


PART ONE
(Answer all the questions)

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)
1.1 The basic design strategies embedded in object-oriented programming is/are
A) Abstraction
B) Composition
C) Generalization
D) All of the above

1.2 Which one of the following does not extends java.awt.Component.
A) Checkbox
B) Canvas
C) CheckboxGroup
D) Label
1.3 In the Java development kit, ________ is a disassembler.
A) javah
B) javap
C) javac
D) jdb
1.4 A class that extends the AbstractList class and implements the List interface akin to an array of
a non-primitive data types and having variable length.
A) HashSet
B) LinkedHashMap
C) ArrayList
D) LinkedList
1.5 When the JVM runs out of memory, a ______ will be thrown.
A) MemoryBoundException
B) OutOfRangeException
C) OutOfMemoryException
D) NullReferenceException
A10.1-R4 Page 2 of 5 January, 2013
1.6 ________ component provides a way to show various dialogs such as error, message,
confirmation, etc
A) JDialogBox
B) JOptionPane
C) JFileChooser
D) JTable
1.7 Java allows the programmer to write one class definition inside of another, such a definition is
termed as ________ in Java.
A) NonInner class
B) Inner class
C) Object class
D) Class class
1.8 RUP stands for ________
A) Relational Unified Practice
B) Relational Unique Process
C) Rational Unified Paradigm
D) Rational Unified Process
1.9 The execution of the following code will print ________.
String x = "7";
x += "8";
System.out.println(x);
A) 7
B) 78
C) 87
D) Error
1.10 The class Graphics2D comes from ________ package.
A) java.awt
B) java.swing
C) javax.swing.
D) java.awt.image

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the “tear-off” sheet attached to the question paper, following instructions therein. (1x10)

2.1 Abstract Data Types is a term referring to an abstract class.
2.2 Reusability is an important aspect of designing classes.
2.3 The Java Virtual Machine enables the same Java application to be used on heterogeneous
platforms.
2.4 Exceptions are not allowed to propagate by Java.
2.5 BorderLayout is the default layout manager for an Applet if you do not set any layout manager.
2.6 The LDAP is a protocol for reading and editing directories over an IP network.
2.7 Methods in the Interface are restricted to be public accessibility even there is no public keyword
when defining them.
2.8 Constructor of a class can never be private.
2.9 The label’s font can be changed using the setFont() method.
2.10 A use case is a scenario tied together by a common user goal.

3. Match words and phrases in column X with the closest related meaning/word(s)/phrase(s) in column Y. Enter your selection in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)

X
Y
3.1
Constant data field in Java  is represented by
A.
deployment of artifacts
3.2
An abstract representation of file and directory pathnames.
B.
procedural behavior
3.3
Multiple choices for the user
C.
configuration of instance
3.4
Single choice for the user
D.
final keyword
3.5
Statement
E.
abstract keyword
3.6
PreparedStatement
F.
File
3.7
FileReader extends
G.
A static SQL statement
3.8
java.util.zip.ZipFile extends
H.
JCheckBox
3.9
Activity
I.
JComboBox
3.10
Object
J.
A precompiled SQL statement


K.
Object


L.
InputStreamReader


M.
InputStream


4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Enter your choice in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)

A.
AppletContext
B.
Green
C.
final
D.
AppletStub
E.
object
F.
Assertion
G.
RuntimeException
H.
JRadioButton
I.
abstract
J.
Activity
K.
Sequence
L.
MVC
M.
Use Case





4.1 The original development of Java was started under Project ________.
4.2 ________ is an invariant, a condition which is always supposed to be true.
4.3 The pattern ________ has been heavily used in the design of the Java Swing.
4.4 ________ interface in Applet API can be used to get the context information the Applet is
running.
4.5 BufferOverflowException extends ________ class.
4.6 In Java, Array is implemented as ________.
4.7 Parallel behavior with conditions can be represented with UML ________ diagrams.
4.8 A class containing one or more unimplemented methods must be ________.
4.9 ________ diagram shows interaction by showing each participants with ordering of messages.
4.10 RadioButtons are implemented in swing through the ________ class

PART TWO
(Answer any FOUR questions)
5.
a) Explain private, protected and public access modifiers of Java in brief.
b) What are accessor and mutator methods? Explain each of them with example.
c) What are the advantages of Object Oriented Programming?
(6+5+4)
6.
a) How does StringBuffer class differ from String class? Explain the following methods of
StringBuffer class with example.
i) setCharAt()
ii) append()
iii) insert()
iv) setLength()
b) Discuss about the DatabaseMetaData and ResultSetMetaData interface with example.
c) Explain with an example the use of static import in a Java file.
(6+6+3)
7.
a) What are the different types of exceptions that might pop-up while processing streams? Write a
program that counts the total number of bytes in a file.
b) What are the adapter classes? Describe the following adapter classes with example.
i) WindowAdapter
ii) KeyAdapter
iii) MouseAdapter
(8+7)
8.
a) Explain Use Case diagrams in UML. What kinds of relationship can be supported by use case
diagrams? Draw use case diagrams for item purchasing system for customers.
b) What do you mean by packages in object oriented paradigms? What types of application uses
package diagrams? Give any one example of package diagram.
(8+7)
9.
a) Discuss the following methods of Graphics class.
i) drawString()
ii) fillRect()
iii) drawArc()
b) List the Wrapper classes. Explain autoboxing and unboxing conversions.
c) What is a CLASSPATH? How can we set the CLASSPATH? Explain with example.
(6+6+3)

No comments:

Post a Comment