Download CUSTOMER_CODE SMUDE DIVISION_CODE SMUDE

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CUSTOMER_CODE
SMUDE
DIVISION_CODE
SMUDE
EVENT_CODE
APR2016
ASSESSMENT_CODE MC0078_APR2016
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
4903
QUESTION_TEXT
Explain all the java buzzword
*Simple (1 mark)
*Secure (1 mark)
*Portable (1 mark)
*Object oriented (1 mark)
*Robust (1 mark)
SCHEME OF EVALUATION
*Multi- threaded (1 mark)
*Architecture- neutral (1 mark)
*Interpreted (1 mark)
*High performance (1 mark)
*Distributed (1 mark)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
4907
QUESTION_TEXT
What is the use of Servlet Development Kit? Explain life cycle of a
Servlet.
SCHEME OF
EVALUATION
The Java Servlet Development Kit(JSDK) contains the class libraries
that you will need to create Servlets. A utility known as the
servletrunner is also included, which enables you to test some of the
Servlets that you create.
Servlet Life Cycle
i.Server loads the Servlet when it is first requested by the client or if
configured to do so, at server start – up.
ii.The server create one or more instances of the Servlet class.
iii.The server constructs a ServerConfig object that provides
initialization information to the Servlet.
iv.Server calls the init() method of each Servlet instance.
v.The server constructs aServletRequest or HttpservletRequest object
from the data included in the client’s request.
vi.The server calls the servlet’s service() method passing the objects
constructed
vii.Servlet’s service() method processes the request and returns output
to client
viii.Servlet waits until next request is received.
ix.Server unloads the Servlet after calling it’s destroy() method.
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
72815
QUESTION_TEXT
Explain the “String Buffer” class in Java with all its supporting
methods.
SCHEME OF
EVALUATION
String Buffer is a peer class of string that provides much of the
functionality of strings.
Strings Buffer defines three constructors. They are
String Buffer()
Sting Buffer (int size)
String Buffer (string str)
The default constructor reserves room for 16 characters without
reallocation.
1. The current length of a string buffer can be found via the length ()
method while the total allocated capacity can be found through the
capacity () method.
2. If you want to preallocate room for a certain number of characters
after a string buffer has been constructed you use ensure capacity () to
set the size of the buffer,.
3. To set the length of the buffer within a string buffer object use set
length ()
4. The of a single character can be obtained from a string buffer via
the char A+() method.
5. To copy a substring of a string buffer into an array use the get
chars () method.
6.The append() method concatenates the string representation of any
other type of data to the end of the invoking string buffer object.
7. The insert() method
8. Java 2 adds to string buffer the ability to delete character using the
methods delete() & delete char A+().
9. Replace () method
10. Java 2 also adds the substring() method, which returns a portion
of a string buffer.
String substring (int start Index)
String substring (int start Index, int end Index)
(Each method 1 mark)
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
72818
QUESTION_TEXT
What is TCP and UDP? Explain briefly
SCHEME OF
EVALUATION
TCP: (5-marks)
Transmission Control Protocol is a connection based protocol that
provides a reliable flow of data between two computers.
When two applications want to communicate to each other reliably,
they establish a connection and send data back and forth over that
connection
A TCP guarantee that data sent from one end of the connection actually
gets to the other end in the same order it was sent. Otherwise an error is
reported.
TCP provides a point-to-point channel for applications that require
reliable communications.
The Hypertext Transfer Protocol(HTTP), File Transfer Protocol(FTP),
and Telnet are all examples of applications that require a reliable
communication channel.
UDP: (5- marks)
User Datagram Protocol is a process that sends independent packets of
data, called datagram, from one computer to another with no guarantee
about arrival.
The UDP protocol provides for communication that is not guaranteed
between two applications on the network.
For many applications, the guarantee of reliability is critical to the
success of the transfer of information from one end of the connection to
the other.
Other forms of communication don’t require such strict standards. In
fact, they may be slowed down by the extra overhead or the reliable
connection may invalidate the services altogether.
UDP is not connection based like TCP.
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
109003
QUESTION_TEXT
Explain the different access specifiers in Java.
–
Public
–
Private
–
Protected
–
Default
SCHEME OF EVALUATION
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
109009
QUESTION_TEXT
What is an Exception. Explain with an example. What are the Exception
Handling Techniques?
Definition (1 mark)
SCHEME OF
EVALUATION
Explanation (4 marks)
Explaining Exception handling Technique (5 marks)