Winter 2014 SCHEME OF EVALUATION PROGRAM MCA(REVISED

Transcription

Winter 2014 SCHEME OF EVALUATION PROGRAM MCA(REVISED
Winter 2014 SCHEME OF EVALUATION
PROGRAM
SEMESTER
SUBJECT CODE &
NAME
CREDIT
BK ID
MAX. MARKS
MCA(REVISED FALL 2012)
FOURTH
MCA 4030 - PROGRAMMING IN JAVA
4
B1477
60
Q.No
Question and Scheme of Evaluation
Unit/
Page No.
Marks
Total
Marks
1
U1/ 4
4+6
10
3
Describe the following:
a) Multi-threading.
b) Significance of Java Bytecode
 Multithreading is the ability of an application to perform multiple
tasks at the same time. You can create multithreading programs
using Java. The core of Java is also multithreaded….
 A programming language has to be portable and also provide
enough ground for security. The key factor that allows Java to
solve both the security and the portability problems is that the
output of a Java compiler is not executable code. Rather, it is
bytecode. Bytecode is a highly optimized set of instructions
designed to be executed by the Java run-time system, which is
called the Java Virtual Machine (JVM). That is, in its standard
form, the JVM is an interpreter for bytecode…..
Differentiate Break and Continue statements in Java with example
program.
 By using break, you can force immediate termination of a loop,
bypassing the conditional expression and any remaining code in
the body of the loop. When a break statement is encountered
inside a loop, the loop is terminated and program control
resumes at the next statement following the loop…..
+example program
 Continue Statement- Sometimes it is useful to force an early
iteration of a loop. That is, you might want to continue running
the loop, but stop processing the remainder of the code in its
body for this particular iteration. The continue statement
performs such an action…
+ example program
Differentiate between packages and Interfaces.
A

A
2
A
Page 1 of 3
Java provides a mechanism for partitioning the class name
space into more manageable chunks. This mechanism is the
package. The package is both a naming and a visibility control
4
6
U3/ 48
10
10
5
5
U5/ 96
10
5
10
4
A
5
A
mechanism. You can define classes inside a package that are
not accessible by code outside that package. You can also
define class members that are only exposed to other members
of the same package. This allows your classes to have intimate
knowledge of each other, but not expose that knowledge to the
rest of the world…
 Using the keyword interface, you can fully abstract a class'
interface from its implementation. That is, using interface, you
can specify what a class must do, but not how it does it.
Interfaces are syntactically similar to classes, but they lack
instance variables, and their methods are declared without any
body……..
What are Applets? What are the restrictions of Applets? Describe
about applet class.
 An applet is a Java program that can be embedded in a web
page. Java applications are run by using a Java interpreter.
Applets are run on any browser that supports Java. Applets can
also be tested using the appletviewer tool included in the Java
Development Kit……
 Applets have certain restrictions put on them.
They cannot read or write files on the user’s system.
They cannot load or run any programs stored on the user’s
system
 The java.applet package is the smallest package in the Java
API. The Applet class is the only class in the package. An applet
is automatically loaded and executed when you open a web
page that contains it. The Applet class has over 20 methods that
are used to display images, play audio files, and respond when
you interact with it…..
Compare JDBC and ODBC
a) OBDC is for Microsoft and JDBC is for Java applications.
b) ODBC can’t be directly used with Java because it uses a C
interface.
c) ODBC makes use of pointers which have been removed totally
from Java.
d) ODBC mixes simple and advanced features together and has
complex options for simple queries. But JDBC is designed to
keep things simple while allowing advanced capabilities when
required.
e) ODBC requires manual installation of the ODBC driver manager
and driver on all client machines. JDBC drivers are written in
Java and JDBC code is automatically installable, secure, and
portable on all platforms.
Page 2 of 3
5
U8/ 128
2+3+5
10
2
3
5
U11/ 176
10
5*2
10
6
Describe about Java Beans and BeanBox.
A



Page 3 of 3
JavaBeans is the software component architecture for Java. It
allows constructing applications efficiently by configuring and
connecting components called Beans. The Beans need to be
written and tested with a rich set of mechanisms for interaction
between objects, along with common actions that most objects
will need to support such as persistence and event handling…
It allows you to try out both the BDK example beans and your
own newly created beans.
The BeanBox allows you to:
Drop beans onto a composition window.
Resize and move beans around.
Edit the exported properties of a bean.
Connect a bean event source to an event handler method.
Connect together bound properties on different beans.
Save and restore sets of beans.
Make applets from beans.
Get an introspection report on a bean.
Add new beans from JAR files.
U12/ 192
5+5
5
5
10