Sunday, 12 February 2017

NIELIT A Level Java Solve Paper Jan-12

 January, 2012
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 method signature consists of
A) Method name and parameter list
B) Method name and return type
C) Method name, return type and parameter list
D) Method name and access modifier
1.2 The dynamic method binding is performed at
A) Runtime
B) Compile time
C) Memory allocation time
D) Class definition time

1.3 In the Java programming environment, which type of programming is required
for running in browser.
A) Application pattern program
B) Servelet pattern program
C) Portlet pattern program
D) Applet pattern program
1.4 What is the main difference between Arraylist and Vector?
A) Arraylist is synchronous and Vector is asynchronous
B) Vector is synchronous and Arraylist is asynchronous
C) There is no difference between Arraylist and Vector
D) None of the above
1.5 In character stream I/O, a single read/write operation perform
A) One byte read/write at a time
B) Two byte read/write at a time
C) Three byte read/write at a time
D) Four byte read/write at a time
A10.1-R4 Page 2 of 5 January, 2012
1.6 In Java programming environment, the throw keyword is used
A) to generate exception programmatically
B) to throw exception object
C) to catch exception object
D) none of the above
1.7 What is the basic difference between Statement interface and PreparedStatement interface?
A) Statement interface is used for static SQL, PreparedStatement interface is used for dynamic
SQL
B) There is no difference between Statement interface and PreparedStatement interface.
C) Statement interface is used for dynamic SQL , PreparedStatement interface is used for Static
SQL
D) None of the above
1.8 The anonymous inner class
A) has an expect class name
B) has no class name
C) has only methods
D) has no instance variables
1.9 In UML, a use case is made up of
A) a set of scenario
B) a set of steps; together that accomplish a specific goal of the use
C) a set of task, associated with a role
D) All of the above
1.10 On a use case diagram, associations are drawn between
A) actor and use cases to show that an actor carries out a use case
B) use case and clean diagram to show conversion of use case to class
C) use case and activity diagram to show conversation of use case to activity.
D) none of the above

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 Multiple inheritance creates confusion in method overloading.
2.2 Access modifiers are used to implement data encapsulation.
2.3 By default all variables of Interfaces are static and final.
2.4 Object class is the top most super class of any java class.
2.5 AWT component are light weight and platform independent.
2.6 In JDBC, DriverManager class provides Connection object.
2.7 Runnable interface can be used to create a thread.
2.8 Java support stream based I/O. FileOutputStream and FileInputStream are the two abstract
base class in Java I/O.
2.9 The Class Diagram describes the types of objects in the system and the static relationship
between them.
2.10 An interaction diagram captures the behavior of a single case by showing the collaboration of
the objects in the system to accomplish the interaction.

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
finally
A.
When a use case describes a variation on another use case
3.2
CallableStatement
B.
Incorporate the definition of one class into another
3.3
Method Overloading
C.
Modifier specifies that the member can only be accessed within its own package and, in addition, by a subclass of its class in another package
3.4
The protected
D.
is an automatic process in java
3.5
Swing
E.
Keyword is used to define a constant
3.6
finalize()
F.
encompass a group of features for building graphical user interfaces (GUIs) and adding rich graphics functionality and interactivity to Java applications
3.7
final
G.
Is used to provide access in some package
3.8
Generalization
H.
block is executed after executing try or catch block
3.9
Extends
I.
is used to execute a stored procedure in database
3.10
Garbage Collection
J.
Is a technique for implementing polymorphism


K.
every class inherits the method from java.lang.Object; the method is called by the garbage collector when it determines no more references


L.
Methods declared final can not be overridden


M.
Supports several constructors

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.

A.
Button
B.
Abstract
C.
Inner
D.
Nested
E.
Label
F.
Stream
G.
Sequence
H.
Multithreading
I.
Collaboration
J.
State
K.
PreparedStatement
L.
Activity
M.
Unicode





4.1 In the Java programming language char values represent ________ characters.
4.2 ________ is a number of lightweight processes that are run in a single process/task or
program by a single processor.
4.3 ________ classes cannot be instantiated, but they can be subclassed.
4.4 As with instance methods and variables, a ________ class is associated with an instance of
its enclosing class and has direct access to that object's methods and fields.
4.5 The ________ component is generally used to show the text or string in your application that
never performs any type of action.
4.6 The Java IO classes, which mostly consists of ________ and readers / writers, are addressing
various purposes.
4.7 ________ is used to execute precompiled sql queries with or without parameters.
4.8 In UML the ________ Diagrams emphasize the order in which things happen.
4.9 Based upon the events that occur, the ________ diagram shows how the object changes from
start to finish.
4.10 ________ diagrams are used to show workflow in parallel and conditionally. They are useful
when working out the order and concurrency of a sequential algorithm.

PART TWO
(Answer any FOUR questions)

5.
a) What is an Interface? What is package? What is the relationship between classpath and
package? What is access modifier? Discuss about the access modifier of Java with respect to
package.
b) Give an example of an interface for adding two integers and concatenating two strings.
Hence, write a program for getting an object of interface through implementation class.
(8+7)
6.
a) i) What is the difference between Error and Exception?
ii) What is checked exception and unchecked exception?
iii) Give the keywords given in Java for handling exception?
b) What is user defined Exception? Give an example for demonstrating user defined Exception.
([3+4+3]+5)
7.
a) What are the steps followed in a Java program to handle data from a database.
b) What are the differences between Swing and AWT?
c) How are streams represented in Java? Write the names of four streams for inputting the data
and two interfaces for streaming object.
(8+3+4)
8.
a) Explain each segment of the design concept MVC. How does MVC component work?
b) Write an Applet program for displaying a pop-up window which displays “Hello World”.
(9+6)
9.
a) What do you mean by Physical Deployment model? Design and draw a view of deployment
model.
b) What is Class diagram? Explain giving an example of class diagram with it properties.
(8+7)

No comments:

Post a Comment