You are on page 1of 87

No.

of Printed Pages : 4 MCS-024

MCA (Revised)
(NI Term-End Examination
June, 2010
0 MCS-024 : OBJECT ORIENTED
TECHNOLOGIES AND JAVA
o m
PROGRAMMING

u . c
r
Time : 3 hours Maximum Marks : 100

u
Note : Q. No. 1 is compulsory. Attempt any three questions

G
from the rest.

1.

n t
(a) Consider a class that stores a Bank account 6

e
holder's account number, ATM card

m
number, account balance and ATM PIN.

n
Write a program to store the data onto a

g
disk file, except for the account balance and

s i
ATM PIN. Use serialization and transient

s
variables.

A
What makes compiled JAVA programs 4

U
platform independent ? Explain.

O
Explain the significance of PATH and 5

N
CLASS PATH.
2

G
Is this a complete and legal comment ?

I / * // */
Justify .
Are inner class secure and useful?
(f) What are the two fundamental mechanisms
5
5
for building a new classes of a existing class ?

MCS-024 1 P.T.O.
The members of which classes can access 5
members of a class in a particular package ?

Explain the significance of each argument 5


in the function main (string args 1).

m
Why cannot the "abstract" method modifier 3

o
be used together with the "native" modifier ?

u . c
2. (a) Differentiate the following and support

u r
G
with example : 2.5x4=10

n t
Final and static member

e
Inheritance and Aggregation

n m
Abstract class and Interface

s i g String and String Buffer

s
(b) Write a program to implement the following

A
operations on a string : 3.5x2=7

O U Convert to uppercase

N
Convert to lowercase

IG (c) What are user - defined exceptions ? 3

3. (a) What is the difference between checked and 3


unchecked exceptions ?

MCS-024 2
Create a class account with the following 5
data members
(i) account id
name

m
(iii) current balance

o
and implement the member functions :
Withdraw

u .c
r
deposit
How multiple inheritance is achieved in

G u 3

t
Java ? Explain with an example.

n
Write an applet that prints "Here" at the 9

e
current cursor position whenever the mouse

m
left button is clicked.

4.

i g n
(a) Write short notes on following :

s s
Interthread communication 3

U A Event Handling in Java


What is a layout managers ? Explain
3

O
6
layouts with example.

N
IG
Write a Java program to set up JDBC and 8
execute the following SQL statement on a
database table employee-t with the fields
emp-id, emp name, emp-department, emp-
basic "SELECT * FROM employee-t where
emp-basic < 10000;

MCS-024 3 P.T.O.
5. (a) Write a program to sort the list given as 10
command line arguments using bubble sort.
What is Java Bean ? What are its 5
advantages ?

m
What is Introspection in Java Beans ? 5

o
Illustrate with a code fragment.

u .c
u r
n tG
e
n m
s i g
As
O U
N
IG
MCS-024 4
IG
NO
UA
ss
ign
me
ntG
uru
.co
m
IG
NO
UA
ss
ign
me
ntG
uru
.co
m
IG
NO
UA
ss
ign
me
ntG
uru
.co
m
No. of Printed Pages : 2 MCS-024

m
MCA (Revised)
Term-End Examination

.co
June, 2011
O
MCS-024 : OBJECT ORIENTED

uru
TECHNOLOGIES AND JAVA
PROGRAMMING

Time : 3 hours Maximum Marks : 100

ntG
Note : Q. No. 1 is compulsory, Attempt any 3 questions from
the rest. Attempt all parts of questions together.

1. (a) Explain, with suitable examples, the 7


e
advantage of object oriented language over
nm

structured programming language.


(b) Differentiate between method overloading 5
and method overriding with an example.
(c) What is the use of class path ? How it helps
sig

in the execution of a java program ?


(d) Explain the advantages and disadvantages 5
of garbage collection.
As

(e) What is the use of Interface ? How can you 6


define and implement it using a program ?
(f) Differentiate checked and unchecked 3
OU

exception. L
(g) Write a program in JAVA to convert given 10
Full Name eg. "Ajay Singh" into First Name
IGN

i.e "Ajay" and Last Name i.e "Singh". Also


sort the given list of names in ascending
order of First Name ?

MCS-024 1 P.T.O.
2. (a) How does java implements the model of 10

m
interprocess synchronization using
Threads ? Explain with the help of a

.co
program.
(b) Write a program in Java which reads the 1,0
content of a given file and writes it to the
console.

uru
3. (a) What is layout manager ? Which is the 10
default layout manager ? Differentiate
among the way of managing components

tG
by 5 different layouts.
(b) Write a program for reading from and
writing to a URL connection.
n 10
me
4. (a) Explain advantage of exception. How 10
exception sub classes are created ? Create
your own exception subclass "My Ex class"
which takes an string as input and throws
gn

a message "string too large" when the size


of string is more than ten characters.
(b) Differentiate between Datagram and stream 5
si

communication.
(c) Explain two uses of "final" keyword with 5
As

the help of example.

5. (a) Write the process of implementing cookies. 10


OU

What is the role of session in handling a


cookie.
(b) What is Inheritance ? Explain its 10
advantages. Also explain with example
IGN

how a subclass is derived from a super class


in Java.

MCS-024 2
No. of Printed Pages : 3 MCS-024

m
MCA (Revised)
Term-End Examination

.co
0
June, 2012

MCS-024 : OBJECT ORIENTED

uru
TECHNOLOGIES AND JAVA
PROGRAMMING

Time : 3 hours Maximum Marks : 100

Note :
the rest.
ntG
Question 1 is compulsory. Attempt any three from
me
1. (a) What is multithreading ? Explain how does 5
it help Java in its performance ?
(b) Differentiate between throw and throws ? 5
n

(c) What is Inheritance ? Briefly explain 5


sig

importance of super keyword in Java ?


(d) What are shift operators ? How many types 5
of shift operators are available in Java ?
As

(e) Briefly explain benefits of stream classes. 5


(f) Explain URL rewriting with an example. 5
OU

(g) Explain how exception handling is done in 5


Java, with the help of an example.
(h) What is a package in Java ? Explain how 5
IGN

package is created in Java.

MCS-024 1 P.T.O.
2. (a) Distinguish between the following terms
with examples : 2.5x4=10

m
(i) Exception and Error
(ii) Method overloading and overriding

.co
(iii) Final and Finally
(iv) Instance variables and class variables.

uru
(b) What is constructor ? Explain constructor 10
overloading in Java with an example.

3. (a) What is the common usage of serialization? 3


ntG
(b) What is the result of compiling and running
the following program ?
5

public class test


me

Public static void main (string args[ ])


n

int i = -1;
sig

i = i>>1 ;
system.out. println (i) ;
As

(c) Explain use of keyword this with the help 3


of program ?
OU

(d) Create a class with in this package "Amount 9


Inwords" to convert amount into words.
(Consider amount not to be more than
IGN

100000)

MCS-024 2
4. (a) What is URL ? Explain two constructor for 8
URL, in Java.net package. Explain how you

m
may connect to a URL in Java.
(b) Write an applet that draws circle, a line, and 5

.co
a polygon inside the applet's visible area.
(c) Compare the different layout managers in 7
brief.

uru
5. (a) Write a serulet program that fetches all data 8
from client and stores it in a database

(b)
successfully. ntG
What do you mean by an event ? Explain 6
different components of an event.
me
(c) What are the different types of AWT 6
components ? How are these components
added to the container.
n
sig
As
OU
IGN

MCS-024 3
No. of Printed Pages : 3 -
I MCS 024

m
MCA (Revised)
Term-End Examination

.co
00
t December, 2012
O MCS-024 : OBJECT ORIENTED

uru
TECHNOLOGIES AND JAVA
PROGRAMMING
Time : 3 hours Maximum Marks : 100

Note :
the rest.
ntG
Question 1 is compulsory. Attempt any three from
me

1. (a) Why java is known as architectural neutral? 2


(b) What is method overloading? Explain your 5
answer with suitable example.
(c) Explain static variable is used in java? 5
gn

(d) What are the functions of the dot(.) 5


operator ? Explain with suitable example.
ssi

(e) Differentiate between Inheritance and 5


Abstract class ?
(f) What is Interface in Java? Explain with an 6
A

example how interfaces are created in Java.


(g) What is multithreading ? Explain Different 6
OU

stages of a thread.
(h) What is Garbage collection? Explain
advantages and disadvantage of Garbage 6
IGN

collection in Java.

MCS-024 1 P.T.O.
2. (a) Briefly explain role of following classes in 6

m
Java Network programming
(i) Socket
(ii) Datagrams Packet

.co
(b) Explain the difference between application 4
and applet ?
(c) What is object oriented programming ? 10

uru
Explain basic concepts of object oriented
programming, briefly.

3. ntG
(a) Explain the two types of exceptions
available in java, with an example of each.
8

(b) Explain when should you extend the thread 4


class for creating a thread.
me

(c) Write a program to read the contents of file 8


into a character away and write it into
another file. Get names of the file from the
user through standard input.
gn

4. (a) Can we import the same package class 5


ssi

twice? Will the JUM load the package twice


at runtime? Justify your answer.
(b) What are the characteristics of JDBC ? What 8
A

are the various types of JDBC? Write a


program to demonstrate how JDBC
OU

connection is established.
(c) WAP to reverse a linked list and then copy 7
IGN

all elements of a linked list into another list.

MCS-024 2
5. (a) What is String Buffer? How it is different 8

m
from String? Write a Java program which
take your name as input and print it in
upper case.

.co
(b) What is RMI ? Explain RMI Architecture 7
with suitable diagram.

uru
(c) Why we use Java Beans in Java? Explain 5
features of Java Beans.

ntG
n me
sig
As
OU
IGN

MCS-024 3
No. of Printed Pages : 4 MCS-024

m
MCA (Revised)
Term-End Examination

.co
June, 2013
0 MCS-024 : OBJECT ORIENTED

uru
TECHNOLOGIES AND JAVA
PROGRAMMING
Time : 3 hours Maximum Marks : 100

tG
Note : Question No. 1 is compulsory. Attempt any three
questions from the rest. Attempt all parts of questions
together.
en
1. (a) Bring out the difference between the string 5
and stringbuffer classes in Java.
m

(b) Explain the concept of inheritance. Give a 7


suitable example by declaring a class and
gn

showing two levels of inherited classes with


the methods of each.
si

(c) There are some classes that reside in a public 4


package called my Package. Give three
As

ways in which these can be accessed in the


default unnamed package. If one of the
classes in my Package has the same name
OU

as a class in the default package, how can it


be referred to in the default package ?
(d) What are the steps involved in creating a 6
IGN

distributed application using Remote


Method Invocation ?

MCS-024 1 P.T.O.
(e) (i) How would you transfer control from 1

m
the innermost loop of a thrice nested
loop to the next statement outside the

.co
loops ?
(ii) What are the conditions necessary for 1
a class to be serializable ?

uru
(iii) Why is it not necessary to handle 2
Runtime Exception ?
(f) When is the "this" keyword used and 4

tG
why ? Write a program fragment to
illustrate.
en
(g) Write a Java program to read a text file and 10
output the number of case insensitive
occurrences of the sequence of letters "the"
m

in it.
gn

2. (a) What are Java controls and 8


containers ? Write an applet that displays
si

three labels and four non-exclusive


As

checkboxes on the screen.


(b) Construct a programming problem where 6
the switch statement cannot be used for
OU

taking decisions. Now write a Java program


to solve the problem.
(c) Write a program to track sessions through
IGN

6
hidden form fields. What is the
disadvantage of this approach ?

MCS-024
3. (a) What is polymorphism ? Write a program 10

m
to illustrate late binding in Java.

(b) "Experiment 1" is a text file. Write a Java 10

.co
program to read" Experiment 1" and copy
the contents of "Experiment 1" to a new file
"Experiment 2". Also count the number of

uru
words and lines copied.

4.
tG
(a) There is a database with a table emp_t that
has employee_id, name, old_basic_salary
12
en
and new_basic. Write a Java program to
find all employees whose old basic salary is
less than 20,000 and give them a 10%
m

raise, while all others get a 6% raise. Update


emp_t with the new basic salary of each
gn

employee.

(b) Suppose x in octal notation is (567)8 and 8


si

similarly y = ( — 325)8. Write down the


values of :
As

(i) x<<y (ii) x/ y


OU

(iii) x & y (iv) x>>3

(v) x >>> 3 (vi) x A y


IGN

(vii) —x (viii)

MCS-024 3 P.T.O.
5. (a) What is meant by thread priority ? Write a 8

m
Java program that creates two threads-one
with minimum and the other with

.co
maximum priority. The first prints the
letters A to Z while the second prints the
numbers 1 to 26. Which thread would you

uru
expect to finish first and why ?
(b) Write a Java program that finds : 8
(i) the area of a circle with that radius if
1 parameter is passed to it.
(ii)
tG
the area of a rectangle with those sides
if 2 parameters are passed to it.
en
(iii)the surface area of a box if 3
parameters are passed to it.
(c) Explain how to compile and run a Java 4
m

Servlet.
si gn
As
OU
IGN

MCS-024 4
No. of Printed Pages : 3 MCS-02-41

m
MCA (Revised)
Term-End Examination

.co
December, 2013

MCS-024 : OBJECT ORIENTED

uru
TECHNOLOGIES AND JAVA
PROGRAMMING
Time : 3 hours Maximum Marks 100
Note : Question No. 1 L; compulsory. Attempt any three

tG
questions from the rest. Attempt all parts of questions
together.
en
(a) Bring out the difference between the 5
statement and prepared statement classes
in Java.
nm

What is the JVM ? How does it helps to 5


make Java machine independent ?
(c) What is Java bean ? List its main features. 5
sig

(d) Draw a chart to show in a class, for each 4


access specifier, which member (class,
package, subclass or all) may NOT reference
As

data or methods of that class ?


(e) Explain when the transient and volatile 6
modifiers are used ?
OU

(f) Describe the concept of method overriding, 5


with an example.
IGN

(g) Write a Java program to count the number 10


of words and lines in a test file using the
string Tokenizer class.

MCS-024 I P.T.O.
2. (a) Write an applet that draws a coloured line 10

m
from the last point on which the mouse was
clicked to the location of the current mouse

.co
click. The colour of the line should be a
parameter passed to the applet when
invoking it.

uru
(b) Write a Java program to show that when 10
more than one thread is waiting for an
object's monitor, and the monitor wakes up

tG
all threads waiting on it, the highest priority
thread that has been waiting is run first.
en
3. (a) There are two files called file 1 and file 2 10
each containing some lines of text (such as
nm

names of people) in sorted order. Write a


program to print total number of words in
both the files. Print which file has larger
sig

number of words.
(b) Arrange the following operators in 4
descending order of precedence
As

?, &&, —, instance of, + +, , 11, %


(c) (i) How can you preven t a class from
OU

being inherited ?
Can an abstract class have a method
that is not abstract ?
IGN

(iii) Can a class reference the members of


its superclass ?

MCS-024 2
(iv) Is multiple inheritance allowed in 2

m
Java ? Is multi-level inheritance
allowed ?

.co
(v) Can you have a try block without a 1
catch clause ?

uru
4. (a) In a two dimensional Java array, can each 10
row have a different number of columns ?
Write a Java program to initialize the
contents of a 3 dimensional array of size

tG
9 x 6 x 11 such that each element is the sum
of the cubes of its subscripts. For example,
en
a [5]141181 = 125 + 64 +512 = 701
(b) Write a Java program to receive a UDP 10
datagram on port 9701 and place the data
nm

received into a file.

5. (a) Write a Java class that takes as input an 10


sig

integer array of numbers and prints out the


sum of all the elements if there are 16 or
less. If there are more elements its throws
As

an exception which gives a message


showing how many extra elements (more
than 16) there are in the array.
OU

(b) What is an interface ? How is it declared 10


and used ? How does it differ from an
abstract class ? What is meant by
IGN

implementing an interface ?

MCS-024 3
No. of Printed Pages : 3 MCS-024
MCA (Revised)/BCA (Revised)

m
Term-End Examination
E
N June, 2014

.co
MCS-024 : OBJECT ORIENTED
TECHNOLOGIES AND JAVA

uru
PROGRAMMING
Time : 3 hours Maximum Marks : 100
(Weightage 75%)

Note : (i)
ntG
Question No. 1 is compulsory.
(ii) Answer any three questions from the rest.
(iii) Attempt all of a question together.
me
1. (a) What is object oriented programming ? 8
How is it different from structured
programming ? Explain advantages of
n

using object oriented programming.


sig

(b) Explain why is Java called platform 3


independent language ?
(c) What is abstraction ? Explain why classes 5
As

in OOP, known as abstract data types.


(d) What is Java applet ? How is it different
OU

from Java application program ?


(e) Explain any five interfaces of the Java IO 5
IGN

package.

MCS-024 1 P.T.O.
(f) What is Exception ? Explain how 9
exceptions are handled in Java. Write a

m
Queue class that throws an exception when
the Queue is full. Display exception
message as "Queue is full".

.co
(g) Explain the Java RMI architcuture with the 5
help of a diagram.

uru
2. (a) What is multithreading ? Explain the steps 10
for creating thread in Java. Also, explain
different predefined thread priorities in
Java. ntG
(b) Write a Java Program which takes two 10
3 x 3 matrices as input and find sum of the
me
two matrices ? Define constructor for
initializing matrix objects.
n

3. (a) Write a Java program that reads the 10


contents of a text file and counts the number
sig

of white spaces, number of characters,


number of words, number of semicolons in
As

the contents. Print the output of program


on standard output.
(b) Write a Java program to find factorial of a 5
OU

number.
(c) What is inheritance ? Explain with an 5
example how is multiple inheritance
IGN

achieved in Java ?

MCS-024 2
4. (a) Write a Java program to setup JDBC and 10
execute an SQL statement on a database

m
table 'BOOK', with the fields BOOK_ISBN,
BOOK_AUTH, BOOK_PRICE, BOOK_PUBL.

.co
The SQL statement should find the
BOOK_AUTH and BOOK_PRICE of the
Book having ISBN = 235001.

uru
(b) What is Polymorphism ? Explain advantage 10
of polymorphism with an example of
managing different types of Bank Accounts.

5.
tG
(a) What is Java Bean ? Explain its advantages.
(b) What is String Class in Java ? Write a
n
program to insert a substring in the middle
5
5

of a string. (Do not use methods of string


me
class)
(c) What is layout manager ? Explain any two 5
layouts in Java briefly.
gn

(d) Differentiate between overloading and 5


overriding with the help of suitable
example.
si
As
OU
IGN

MCS-024 3
No. of Printed Pages : 3 MCS-024

m
MCA (Revised) / BCA (Revised)
Term-End Examination

co
December, 2014

.
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND

uru
JAVA PROGRAMMING
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
Note :
(i)
tG
en
Q. No. 1 is compulsory.
(ii) Attempt any three questions from the rest.
(iii) Attempt all parts of a question together.
nm

1. (a) Define the concept of inheritance. Explain


the advantage of inheritance with the help
sig

of an example. 7
(b) What is classpath ? Explain the use of
classpath in Java programming. 4
As

(c) What is multithreading ? How is thread


synchronization implemented in Java ?
Explain with an example. 8
OU

(d) What is an event in GUI programming ?


Explain different components of an event. 6
(e) What is inner class ? Explain whether
IGN

inner class is secure and useful. Justify


your answer. 6

MCS-024 1 P.T.O.
(f) What is final keyword ? Explain different
uses of final in Java. 4

m
(g) What is exception ? Explain difference
between checked and unchecked exceptions

co
with an example of each. 5

.
2. (a) Differentiate the following, with the help of

uru
example : 4x3=12

(i) Application and Applet


(ii) Structure Approach and Object

tG
Oriented Approach
(iii) String and String Buffer
en
(iv) Abstract Class and Interface

(b) Write a class complex to represent complex


numbers, with suitable constructor and
nm

function to find the sum of two complex


numbers. 8
sig

3. (a) What is StreamTokenizer ? Explain the


different instance variables defined in
StreamTokenizer. Also, explain use of
StreamTokenizer with the help of an
As

example. 10

(b) "Java is architecture neutral, secure and


OU

distributed programming language."


Justify the statement.

(c) What is private access specifier ? Explain


IGN

with an example, how it is different from


public and protected access specifiers.

MCS-024 2
4. (a) What is finalize( ) method in Java. Give an
example to demonstrate its use. 5

m
(b) Define package in Java. Explain the need
of 'user created package' in Java. Also,

co
explain the procedure of creating a package
in Java. 5

.
(c) What is the difference between throw and

uru
throws keywords used in Java ? Explain
with an example. 5

(d) Explain use of super keyword in Java, with


an example.
tG
5. (a) What is stateless protocol ? Is HTTP a
5
en
stateless protocol ? What are the various
ways through which you can maintain the
`State' while using HTTP ? 8
nm

(b) Differentiate between TCP client and TCP


server socket with the help of an example. 4
sig

(c) What is RMI ? Explain advantages of using


RMI. 3
As

(d) Briefly explain the life cycle of a servlet. 5


OU
IGN

MCS-024 3 12,000
No. of Printed Pages : 3 I MCS-024 I

m
MCA (Revised) / BCA (Revised)
Term-End Examination

.co
07823 June, 2015

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING
Time : 3 hours Maximum Marks : 100

ntG
(Weightage 75%)

Note :
(i) Q. No. 1 is compulsory.
me
(ii) Attempt any three questions from the rest.

1. (a) What is Class ? How does it accomplish


Data Hiding ? Explain with an example. 5
ign

(b) State any three differences between AWT


and Swing components. 6
(c) Explain the concept of Inheritance and
ss

Polymorphism with an example of each. 8


(d) What do you mean by serialization ? What
UA

is the common usage of serialization ? 5


(e) What are cookies and session variables and
where do we use them ?
NO

(f) Write a Java program to read text from


keyboard and write it to a file called
`MyText.txt'.
IG

(g) Explain any five basic features of Java in


brief. 5
MCS-024 1 P.T.O.
2. (a) Differentiate between the following terms

m
with examples : 3x4=12
(i) Structured Programming and Object

.co
Oriented Programming
(ii) Data Abstraction and Encapsulation
(iii) length and length( )

uru
(iv) Class and Object

(b) What are the two methods to create

ntG
threads ? Explain them with a suitable
example. 8

3. (a) What is RMI ? How can you create stub


me
and skeleton ? Write the steps involved. 7

(b) Write a program to read the content of the


file `MyDoc.doc' and display it on console. 6
ign

(c) What is exception ? Explain the basic


causes of exception. Write a Java program
to explain how exceptions are handled. 7
ss

4. (a) Write a Java program to create a Shape


UA

class. Derive Circle and Square classes


from it. Define constructor for these three
classes.
NO

(b) Explain the different steps in the life cycle


of an applet. 5
IG

(c) What is a package ? Develop a Java


package with simple queue and stack class.

MCS-024 2
5. (a) What is Servlet ? Explain how session

m
handling is performed in Servlet
programming.

.co
(b) What is an Interface ? Write a Java
program to show how a class implements
two interfaces. 6

uru
(c) What is String class ? How is it different
from StringBuffer class ? Write a Java
program to find the length of a given string. 7

ntG
me
ign
ss
UA
NO
IG

MCS-024 3 12,000
a *a
No. of Printed Pages : 3

m
MCS-024
MCA (Revised) / BCA (Revised)

.co
Term-End Examination
December, 2015

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING
Time : 3 hours Maximum Marks : 100
ntG (Weightage 75%)
Note : Question no. 1 is compulsory. Attempt any three
questions from the rest.
e
1. (a) Explain the basic features of Object
nm

Oriented Programming Language.


(b) Why is Java called Machine Independent
Language ? Explain the functionality of
sig

JVM.
(c) What is the difference between constructor
and method ? Explain with an example. 5
As

(d) Explain the uses of keywords final, finally


and finalize in Java. 6
(e) What is an abstract class ? Explain the use
OU

of abstract class with an example. 6


(f) What are the different boolean and bitwise
operators in Java ? Explain in brief. 6
IGN

(g) Write a Java Applet to display "Java is an


Object Oriented Programming Language";
in red color. 7

MCS-024 1 P.T.O.
m
2. (a) Distinguish between the following terms
with suitable example(s) : 4x3=12
(i) Method Overloading and Overriding

.co
(ii) Application and Applet
(iii) Get Method and Post Method in
Servlet.

uru
(iv) Readers / Writers and 1/0 Streams.
(b) What is listener ? Write a program to
implement mouse motion listener.

ntG
3. (a) What is encapsulation ? Explain its
advantage with suitable example.
(b) What will be the output of the following
3

program :
e
Class t extends Thread
nm

public void run ( )

System.out.println ("start");
sig

yield 0;
resume 0;
System.out.println ("restart");
As

stop 0;
resume 0;
System.out.println ("Nothing");
OU

public static void main (String a [

t 1 = new t 0;
IGN

tl.start O;

MCS-024 2
(c) Explain the output stream class hierarchy

m
in Java. 6

.co
(d) What is layout manager ? Explain the Flow
Layout and Border Layout. Also explain
how a layout is set.

uru
4. (a) What is a JavaBean ? Discuss its features
in brief. 5
(b) What is checked exception ? How is it
ntG
different from unchecked exception ?
Explain with an example. 7

(c) What is inheritance ? Create a class Train


e
and inherit class SuperfastTrain from it,
nm

define proper constructor for both of the


classes. 8

5. (a) Write a program in Java to implement


sig

socket programming using DataGram


Class. 8

(b) How do we design a package in Java ?


As

What are the steps to add classes and


interfaces in a package ? 6
OU

(c) What is synchronization ? Explain how


methods are synchronized in Java, with the
help of an example. 6
IGN

MCS-024 3 12,000
No. of Printed Pages : 3 I MCS-024

m
MCA (Revised) / BCA (Revised)
Term-End Examination

.co
June, 2016
017-1-6 16

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING

tG
Time : 3 hours Maximum Marks : 100
(Weightage 75%)
en
Note : Question no. 1 is compulsory. Attempt any three
questions from the rest.
nm

1. (a) Explain the relationship between Data


Abstraction and Encapsulation. 4
(b) Explain the need of main( ) function in
sig

writing a Java program using an example


program. 6
(c) Explain function overloading using an
As

example.
(d) Explain Java Thread Model using Thread
OU

Life Cycle. 6
(e) What is the usage of literals in a
programming language ? Explain the usage
IGN

of any six Java literals used in Java


programming, with examples. 6

MCS-024 1 P.T.O.
(f) Explain the usage of Flow Layout and Card

m
Layout in Java Applet with diagram. 6

.co
(g) Explain the usage of container in Java
Applet and Servlet.

uru
2. (a) Explain the usage of reserved ports in net
programming for FTP, TCP, etc.

(b) Explain all steps of using arrays in a Java

tG
program. 6

(c) Write a program for reading input from the


en
console using StringBuffer( ). 8

3. (a) Explain all the components used for


nm

handling an event in a Java program. 6

(b) What are Java beans ? Explain their


special features. 6
sig

(c) Write a Java program to show inter thread


communication. 8
As

4. (a) Explain method overriding using a


program. 6
OU

(b) How does an index method help in string


operations ? 6

(c) Write the steps of incorporating Applet in a


IGN

web page. 8

MCS-024 2
5. (a) Explain the usage of Stream Tokenizer

m
class.

.co
(b) Write a Java program to convert all the
strings of input to upper case. The input
string should be submitted using a textbox

uru
in a form of web page.

(c) Write the steps of JDBC in establishing a


connection for creating dynamic website.

tG
en
nm
sig
As
OU
IGN

MCS-024 3 11,500
No. of Printed Pages : 3 I mcs-o241

m
MCA (Revised) / BCA (Revised)
Term-End Examination

.co
December, 2016
04 c--1c----1 S-
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND

uru
JAVA PROGRAMMING

Maximum Marks : 100

tG
Time : 3 hours
(Weightage 75%)
en
Note : Question no. 1 is compulsory. Attempt any three
questions from the rest.
nm

1. (a) Explain the relationship between


inheritance and polymorphism. 4

(b) Explain why main() is not included in


sig

writing a Java applet program using an


applet coding. 6
(c) Explain method overloading using an
As

example. 6

(d) Explain the process of inter-thread


OU

communication. 6

(e) Explain the usage of three assignment


operators and three bitwise operators in
IGN

Java programming. 6

MCS-024 1 P.T.O.
(f) Explain the usage of GridLayout and

m
GridBagLayout in a Java Applet with
diagram.

.co
(g) Which types of components are used in
designing swing based GUI ? 6

uru
2. (a) Explain the usage of anonymous proxy
servers in designing mailing application. 6

(b) Explain the steps of using

program. tG
multidimensional arrays in a Java
6
en
(c) Write a Java program for "writing output
on console" using PrintWriter() method. 8
nm

3. (a) Describe all the steps used in writing a


Java program for handling events.
sig

(b) What is the usage of RMI in calling


methods from remote class ? 6
(c) Write a Java program to show interprocess
As

synchronization. 8

4. (a) Explain multithreading using a program. 6


OU

(b) Explain the usage of lastlndexOf (int ch,


int fromIndex) method in string operation. 6
IGN

(c) Write a program for passing parameters to


an Applet using a web page. 8

MCS-024 2
5. (a) Explain the term BufferedStream using a
Java program.

m
(b) Write a Java program for writing files in

.co
"C: \javafiles \" location.

(c) Explain the steps of JDBC in establishing a

uru
connection for creating a dynamic website
for INSERT/UPDATE the attendance
record for employees of an organization.

tG
en
nm
sig
As
OU
IGN

MCS-024 3 9,000
No. of Printed Pages : 4
I MCS-024 I
MCA (Revised) / BCA (Revised)

m
Term-End Examination

.co
A- CD Ealle 1- June, 2017

MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND

uru
JAVA PROGRAMMING

Time : 3 hours Maximum Marks : 100


(Weightage 75%)

tG
Note : Question no. I is compulsory and carries
40 marks. Attempt any three questions from the
en
rest.

1. (a) An employee works in a particular


nm

department of an organisation. Every


employee has an employee number, name
and draws a particular salary. Every
department has a name and a head of
sig

department. The head of department is an


employee. Every year a new head of
department takes over. Also, every year an
As

employee is given an annual' salary


enhancement. Identify and design the
classes for the above description with
OU

suitable instance variables and methods.


The classes should be such that they
implement information hiding. You must
IGN

give logic in support of your design. Also


create two objects of each class. 6
MCS-024 1 P.T.O.
(b) Consider the 'following class hierarchy :
Sportsperson (Name)

m
.co
Athlete (Event) Hockey player
(Goals scored)

uru
In this hierarchy, you can assume that a
sportsperson can either be an athlete or a
hockey player. Every sportsperson has a

tG
unique name. An athlete is characterised
by the event in which he/she participates;
en
whereas a hockey player is characterised
by the number of goals scored by him/her.
Perform the following tasks using Java :
nm

(i) Create the class hierarchy with


suitable instance variables and
methods. 3
sig

(ii) Create a suitable constructor for


each class. 3
As

(iii) Create a method named


display_all_info with suitable
OU

parameters. This method should


display all the information about the
object of a class. 3
IGN

(iv) Write the main method that


demonstrates polymorphism. 4

MCS-024 2
(c) A text file stored on the disk is to be
opened for reading operations. What are
the different checks ,that should be

m
performed on this file ? Write the portion of
the code in Java to perform these checks.

.co
Explain the thread model with the help of
a diagram. 6

uru
What is a layout manager ? Explain the
flow layout and grid layout with the help of
an example of each. 7

tG
(0 What is an event in the context of Java ?
Explain the semantic event with the help
of an example.
en
4

2. (a) Differentiate between the following : 12


nm

(i) Procedural paradigm versus


Object-oriented paradigm
(ii) While versus For statements of Java
sig

(iii) Function overloading versus Method


overriding
(iv) Java application versus Java applet
As

(b) Explain the importance/uses of the


following with the help of an example each :
OU

Bitwise operators
Operators precedence
Array initializer
IGN

Byte code
MCS-024 3 P.T.O.
3. (a) Define the term exception in the context of
Java. What are the causes of exception ?

m
What are the actions that may need to be
performed if an exception is caught ?
Explain the uses of try and catch in Java

.co
with the help of an example program
segment. 10
(b) What is an Interface ? What is meant by

uru
`implementing interfaces' ? Explain with
the help of an example. 5
(c) What are the uses of "this" keyword in

tG
Java ? Explain with the help of an example.
4. (a) What are the advantages of multithreading
en
in Java ? Explain the interthread
communication with the help of an example. 8
nm

(b) Write a program in Java that converts a


string 127 into equivalent integer value
and prints it.
(c) - What are the uses of the following in the
sig

context of I/0 in Java ?


(i) File class
(ii) Buffered stream classes
As

5. Explain the following with the help of an


example/diagram/program, if needed : 5x4=20
OU

(a) Creating a choice list in Java


(b) Using checkboxes in JaVa
(c) Drawing a rectangle in Java
IGN

(d) Servlet Life Cycle


(e) Executing SELECT statement in Java
MCS-024 4 9,000
No. of Printed Pages : 5 I MCS-024 I

m
MCA (Revised) / BCA (Revised)
Term-End Examination

.co
December, 2017
0.4-1:360

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING

Time : 3 hours Maximum Marks : 100

tG (Weightage 75%)
en
Note : Question no. 1 is compulsory and carries
40 marks. Attempt any three questions from the
rest of the questicins.
nm

1. (a) Consider the following class hierarchy :


sig

Student (name, age, programme)

1
As

Graduate_student Research_student
(% marks in 12th, stream) (specialisation, years of experience)
OU

A university has two types of


students — graduate students and
research students. The University
IGN

maintains the record of name, age and


programme of every student. For graduate
MCS-024 1 P.T.O.
students, additional information like

m
percentage of marks and stream, like
science, commerce, etc. is recorded;
whereas for research students,

.co
additionally, specialisation and years of
working experience, if any, is recorded.
Each class has a constructor. The

uru
constructor of subclasses makes a call to
constructor of the superclass. Assume that
every constructor has the same number of
tG
parameters as the number of instance
variables. In addition, every subclass has a
en
method that may update the instance
variable values of that subclass. All
the classes have a function
nm

display_student_info( ), the subclasses


must override this method of the base
class. Every student is either a graduate
sig

student or a research. student.


Perform the following tasks for the
description given above using Java :
As

(i) Create the three classes with proper


instance variables and methods,
OU

with suitable inheritance. 5


(ii) Create at least one parameterised
constructor for each class. 3
IGN

(iii) Implement the display_student_info( )


method in each class. 3
MCS-024 2
(iv) Create an appropriate main method
with at least two objects of each

m
subclass. Can you create an object of
the superclass ? Justify your

.co
answer.
(v) Write the code in main that uses

uru
objects - and overriding to show
polymorphism.

(b) What is multithreading ? What are the


tG
advantages of multithreading ? What is a
main thread in the context of Java ?
en
(c) Write a Java program that accepts the
input from the keyboard and writes it to a
nm

text file.

(d) Explain how an event is handled in Java


with the help of an example program.
sig

(e) Assume that a database named "Student"


exists with attributes student_ID,
student_name and programme. Write a
As

Java program segment which will execute


a SELECT query and display the resultant
OU

records. You need' not write the connection


command.

(f) What is Bytecode in Java ? What are the


IGN

advantages of using bytecode in Java ?

MCS-024 3 P.T.O.
2. (a) List the salient features of object oriented
programming approach that distinguishes

m
it from the procedural programming.

.co
(b) Explain different forms of inheritance with
the help of diagrams. What are the
advantages of using inheritance ? 8

uru
(c) Explain the following with the help of an
example of each :
(i) Dynamic Initialization
(ii)
(iii)
tG
Operator Precedence
Switch Statement
en
(iv) Array Initialization

3. (a) What is Static Method in Java ? Explain


nm

with the help of an example. 4

(b) Explain with the help of an example


program, how objects can be passed as
sig

parameters in Java. 5
(c) What is a Package in Java ? How are they
related to CLASSPATH ? Explain with the
As

help of an example program. 6


(d) What is an Interface in Java ? How are
OU

they different from ABSTRACT classes ? 5

4. (a) Explain with the help of an example


program, how interthread communication is
IGN

performed in Java using wait( ) and notify( )


and other methods. 6
MCS-024 4
(b) How is Character class in Java different to
Striiig class ? Explain how you will

m
compaie two objects of String class. Also
write a program that converts lowercase

.co
characters to uppercase characters of a
string. 8

(c) What Is the purpose of the following

uru
Stream classes ? 6
(i) PrintStream
RandomAccessFile

tG
ByteArraylnputStream
(iv) FilterOutputStream
en
5. Explain the following with the help of a/an
diagram/example/program, if needed : 20
nm

(a) Paint( ) Method of Applet


(b) HTML Applet Tag
(c) Button
sig

(d) Checkbox Group


(e) Grid Layout (No need of writing program)
(0 Container
As

(g) Uses of RMI


(h) POST Method
OU
IGN

MCS-024 5 8,000
No. of Printed Pages : 3 I MCS-024

m
MCA (Revised) / BCA (Revised)
Term-End Examination

.co
June, 2018
CJ r C.)

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING

Time : 3 hours
ntG Maximum Marks : 100
(Weightage 75%)
me
Note : Question no. 1 is compulsory. Attempt any three
questions from the rest of the questions.
gn

1. (a) What is method overloading ? Explain with


suitable example. 5
si

(b) What is an abstract class ? How is it used


to implement polymorphism in Java ? Give
As

suitable example in support of your answer. 7


(c) What is JVM ? Explain advantages of JVM. 3
OU

(d) Differentiate between "Final", "Finally" and


"Finalize" statements. 6
(e) Compare throw statement in Java with
IGN

throws statement. 4

MCS-024 1 P.T.O.
(f) Explain container class in Java. Give its
significance for Java GUI programming. 5

m
(g) What is public access specifier ? How is it
different from private access specifier ?

.co
Explain with example. 5

(h) What is an applet ? Explain various ways

uru
to execute an applet. 5

2. (a) What is servlet life cycle ? Explain


GET and POST methods in servlet

(b)
programming. ntG
What is import ? Explain the need of
10

importing a package in Java. 5


me
(c) What is a classpath ? Discuss the utility of
classpath with suitable example.

3. (a) What is inheritance ? How is inheritance


gn

related to interface ? Explain, how multiple


inheritance can be implemented using
si

interface in Java. Give suitable example. 10


(b) Write a Java program to create a Teacher
As

class and derive Professor/


Associate_Professor/Assistant_Professor
class from Teacher class. Define
OU

appropriate constructor for all the classes.


Also define a method to display information
of Teacher. Make necessary assumptions as
IGN

required. 10

MCS-024 2
4. (a) What are the features of Object Oriented
Programming ? Explain encapsulation and

m
its advantages, with an example.

.co
(b) How is String class different from
StringBuffer class ? Write a program in
Java to find the length of a given string. 7

uru
(c) Write a program in Java, to copy the text
content of one file into another file. 7

5. ntG
(a) Explain each component of the statement
"public static void main (string args ] )". 6

(b) What is an event in Java ? How does Java


me
handle events ? Write a program in Java, to
capture any event generated by a keyboard. 7
(c) What is exception in Java ? What are the
gn

basic causes of occurrence of exception ?


Write a program in Java, to exhibit the
si

concept of exception handling. Support your


program with suitable comments. 7
As
OU
IGN

MCS-024 3 12,000
No. of Printed Pages : 3 I mcs-0241

m
MCA (Revised) / BCA (Revised)

.co
Term-End Examination
December, 2018
OkESSS 3

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND
JAVA PROGRAMMING

Time : 3 hours ntG Maximum Marks : 100


(Weightage : 75%)

Note : Question no. 1 is compulsory. Attempt any three


e
questions from the rest.
nm

1. (a) What do you understand by 'this' keyword ?


Explain its usage with an example. 5
sig

(b) What is an event in Java ? Describe


different components of an event.
As

(c) What is an interface ? Discuss the utility of


-interface with suitable example. 5

(d) What are cookies ? Discuss the role o f


OU

cookies in session tracking. 5

(e) Compare AWT and Swing components. 5


IGN

(f) Write a Java program, to find factorial of a


given number. 5
MCS-024 P.T.O.
(g) What is a layout manager ? Explain Border
layout with an example. 5

m
(h) Explain the Java RMI architecture with
5

.co
the help of a diagram.

2. (a) Write a Java program that reads the


content of a text file and counts the number

uru
of white spaces, number of characters,
number of words and number of full stops
in the content. Support your code with

ntG
comments, to describe your logic.
(b) What is multithreading ? Explain the steps
for creating thread in Java. Also explain
10

the predefined thread priorities in Java. 10


e
3. (a) What are class and objects ? Explain how
nm

an object is created in Java ? Also explain


the role of constructor in Java using Java
code. 10
sig

(b) What is Polymorphism ? Explain the


difference between method overloading and
method overriding with the help of
As

example. 10

4. (a) Explain the life cycle of Applet. List the


OU

methods involved in it. 10


(b) Write a Java program which takes two
3 x 3 matrices as input and finds the sum of
IGN

the two matrices. Define constructor for


initialization of matrix objects. 10
MCS-024 2
5. Write short notes on the following (Give example
for each) : 4x5=20

m
(a) Message Passing

.co
(b) Java Beans

(c) Strings in Java

uru
(d) Package

e ntG
nm
sig
As
OU
IGN

MCS-024 3 10,000
0031
No. of Printed Pages : 3 MCS-0241

m
MCA (Revised) / BCA (Revised)

.co
Term-End Examination, 2019
MCS-024 : OBJECT ORIENTED TECHNOLOGIES
AND JAVA PROGRAMMING

uru
Time : Three Hours] [Maximum Marks : 100
(Weightage 75%

Note : Question No. 1 is Compulsory. Attempt any three


questions from the rest.
ntG
me
1. (a) Write a java program to read the contents of
binary file and write it on the standard output. [10]
ign

(b) What is purpose of Serialization of an object ?


How does the volatile modifier to a data type affect
serialization ? [5]
ss

(c) Justify "Java is secure and architectural neutral


UA

language". [3]

(d) What are cookies and sessidn objects ? Where


NO

do we use them ? [5]

(e) Explain the concept of inheritance and


IG

polymorphism, with an example of each. [7]


MCS-024 (1) [P.T.O.]
m
(f) Differentiate between AWT and Swing
Components. [5]

.co
(g) What is the difference between notify( ) and notify
All( ) method.

uru
[5]

2. (a) What is exception ? What are causes of


exception ? What can be done once an exception

ntG
is caught ? Explain use of finally clause in
exceptions handling, with the help of an example.
[10]
me
(b) Differentiate between following : [10]
ign

(i) Public member and private member

(ii) Overloading and Overriding


ss

(iii) Java application and Applet

(iv) FOR statement and WHILE statement


UA

3. (a) What is Multithreading ? What is the advantage


NO

of multithreading in Java ? [5]

(b) What are Interfaces in Java ? What do you


IG

understand by 'implementing interfaces' ? Explain


with the help of an example. [7]

MCS-024 (2)
m
(c) What is JDBC ? What are the characteristics of
JDBC ? Write a program to demonstrate how

.co
JDBC connection is established. [8]

(a) What is String in Java ? Explain any three

uru
constructors of String Class. Write a program in
Java to find length of a given string and display

ntG
the string in upper case. [10]

(b) What is servlet ? How servlet differs from Applet?


Explain the lifecycle of Applet. [10]
me
5. (a) Write a Java program to create student class with
data member student_name, roll-number and
ign

Marks. Define appropriate constructor in the


program. Create array of ten student objects. Also
display the name and rollnumber of the student
ss

with highest marks (in the array created). [10]


UA

' (b) What is RMI ? Explain RMI architecture with


suitable diagram. [5]
NO

(c) What are Java Beans ? Discuss the utility of Java


Beans. Explain the features of Java Beans. [5]
IG

MCS-024 (3) 9000


9364

m
No. of Printed Pages.: 4 1MCS-0241

co
MCA (Revised) / BCA (Revised)

Term End Examination, 2019

.
-

uru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES
AND JAVA PROGRAMMING

Time : 3 Hours]
ntG [Maximum Marks : 100
(Weightage 75%)
me
Note : Question no. 1 is compulsory and carries 40 marks.
Attempt any three questions from the rest.
ign

1. (a) How String Buffer differs from String ? Write a


program in Java, which takes your name as input
and print it in upper case.
ss

[5]

(b) How does Java handle events ? Write a program


UA

in Java to capture an event generated by


keyboard.
[5]
NO

(c) What are the uses of "this" keyword in Java ?


Explain with the help of an example. What is an
IG

applet ?
[5]

MCS-024/9500
m
Write a program to generate a circle in an
(d)

co
[5]
applet ?

What do you understand by session tracking in


(e)

.
uru
Java ? Discuss any technique, used for session
[5]
tracking.

Differentiate between superclass and

ntG
(f)
subclass. Write a program in Java to show the

concept of reusability. [51


me
What is exception in Java ? How exception
(g)
handling is performed, demonstrate with an

example ? [51
ign

(h) Explain constructor overloading with suitable

example. [5]
ss

What is checked exception in java ? How it is


2. (a)
UA

different from unchecked exception ? Explain

briefly. [5]
NO

(b) Write a Java program to find whether a given


element is present in a integer array of size ten
[51
IG

of not. -

(2)
m
(c) What is a layout manager ? Discuss the Flow

co
layout and grid layout, give suitable example for
each. [1 0]

.
uru
(a) Briefly explain the role of following classes in Java
Network programming : [5]

(I) Socket

(ii) ntG
Datagram Packet

(b) What is the difference between a process and a


me
thread ? Mention any three methods of thread
class and describe them briefly. [8]
ign

(c) What is an event ? What are components of an


event? Differentiate between semantic event and
ss

low-level event. [7]

(a) Write a Java program to create shape class.


UA

Overload method area ( ) to calculate area of


circle and rectangle. Define appropriate
NO

constructors in the program. [6]

(b) What are Input stream and output stream classes


IG

in java ? List and explain any two methods of each


class. [5]
MCS-024/9500 ( 3) [P.T.O.]
m
(c) Explain how garbage collection takes place in

Java, also list advantages of garbage collection.

co
[4]

.
What is an interface ? Write a java program to

uru
(d)
show, how a class implements two interface.[5]

5. Write short notes on the following : [20]

ntG
Java Beams and its advantages

(ii) Class and object


me
(iii) Applet Architecture
ign

(iv) Access specifiers

(v) Bitwise operators in java


ss

x
UA
NO
IG

MCS-024/9500 (4)
No. of Printed Pages : 4 I MCS-024

m
MCA (Revised) / BCA (Revised)

.co
Term-End Examination

MCS-024 : OBJECT ORIENTED TECHNOLOGIES

uru
AND JAVA PROGRAMMING

Time : 3 Hours) [Maximum Marks : 100

tG
en (Weightage 75%)

Note: Question number 1 is compulsory. Answer any


threqusionfmthequsion.
nm

1. (a) What do you understand by "method


overloading"? How it is different from "method
sig

overriding"? Give suitable example for each.


5
As

(b) What is the purpose of setting class path?


How it supports the execution of Java
OU

program? Write the steps, performed to set


the class path. 5
IGN

(c) What do you mean by "garbage collection"


in Java? Give advantages and disadvantages
of garbage collection. 5

MCS-024 / 3060
(d) What is interface in Java? Write a java

m
program to exhibit, how to define and
implement interface. 5

.co
(e) What are the uses of "this" keyword in java?
Explain with the help of an example. 5

uru
(f) What is byte code? Explain the difference
between compiled code of Java and compiled

tG
code of C. 5

(g) Write a program in Java to convert the string


en
"IGNOU" in lower case i.e. "ignou". Give
suitable comments in your code, to increase
nm

the readability. 5

(h) What is an abstract class? How it is used to


sig

impliment polymorphism in Java? 5

2. (a) Explain the life cycle of applet, with suitable


As

diagram. 5

(b) Write a program in Java that reads text from


OU

the key board and writes it to a ".txt" file.


Incorporate suitable comments in your
IGN

program, to improve the readability of your


logic. 7

(2) MCS-024 / 3060


(c) Explain "«", "" and "&" bitwise operators

m
in Java. Write a Java program to perform "cc"
bitwise operator on a given number. 8

.co
3. (a) What is certainer (in context of java)? Explain
the significance of container in Java GUI

uru
program. 5
(b) What is stream tokenizer in Java? What is
its significance ? Discuss the instance

tG
variables defined in streamtokenizer? Give
an example to show the use of
en
streamtokenizer. 7
(c) Write a client & server programs in Java to
nm

show the TCP connection establishment and


data transfer. 8
sig

4. (a) Write a JAVA program to draw a color filled


line and a color filled rectangle. 5
(b) Explain the term RMI in Java. Briefly discuss
As

the steps involved in creation of stub and


skeleton. 7
OU

(c) Discuss the concept of multithreading in


Java. What are the advantages of
IGN

multithreading? Explain the interthread


communication with the help of an example.
8
MCS-024 / 3060 (3)
5. (a) What do you understand by "exception", in

m
context of Java? How it is handled, explain

.co
with the help of suitable example code in
Java? 5

uru
(b) What is a layout manager? Briefly discuss
the role of layout manager in Java. Explain
the flow layout and grid layout with the help

tG
of an example for each. 7
en
(c) Differentiate between any two of the
following: 8
nm

(i) String class and stringBuffer class


sig

(ii) Throw statement and throws statement

(iii) Final and Finally


As

-X-
OU
IGN

(4) MCS-024 / 3060


No. of Printed Pages : 4 MCS-024

om
M. C. A. (REVISED)/B.C.A. (REVISED)

u.c
Term-End Examination
December, 2020

ur
MCS-024 : OBJECT ORIENTED TECHNOLOGIES

tG
AND JAVA PROGRAMMING

Time : 3 Hours Maximum Marks : 100


en
Weightage : 75%
m

Note : Question No. 1 is compulsory. Attempt any


ign

three questions from the rest of the


questions.

1. (a) What is Multithreading ? How is


ss

multithreading supported in Java ? 5


UA

(b) What is explicit casting ? Explain with


suitable example. 5
NO

(c) What is the difference between declaring a


variable and defining a variable ? Explain
IG

with the help of an example. 5

Lot-II P. T. O.
[2] MCS-024

(d) Explain the following and their usage

om
using suitable examples : 5

(i) Extends

(ii) Implements

u.c
(e) Write a java program to convert a given
string to uppercase and also display the

ur
length of the string. 5

tG
(f) What is datagram socket ? Explain the use
of datagram socket with the help of a
en
program in java. 5

(g) Write a java program to draw a triangle. 5


m

(h) What is function overloading ? Explain it


ign

with the help of a program, written in


java. 5
ss

2. (a) How does java application differ from java


applet ? Do we write “public static void
UA

main(string args [ ]) in applet ? Justify. 5

(b) Write a java program to copy the text


NO

content of one file into another file.


Support your program with suitable
IG

comments. 7
[3] MCS-024

(c) What is the relation between interface and

om
inheritance ? Explain how multiple

inheritance can be implemented in Java

using interface. 8

u.c
3. (a) Explain the life cycle of servlet, along with

ur
a program that creates a simple servlet

generating HTML to write “welcome

students”.
tG 10
en
(b) What is an exception ? What is runtime

exception ? Write a java program to search


m

element in a given array with provision of


ign

exception handling. 10

4. (a) How java implements the model of


ss

interprocess synchronization using threads ?


UA

Explain with the help of a program. 10

(b) What is Inheritance ? What are the


NO

advantages of inheritance ? Write a java

program to demonstrate implementation of


IG

inheritance. 10

P. T. O.
[4] MCS-024

5. Write short notes on the following : 5 × 4 = 20

om
(a) Cookies and their role in session handling

(b) Layout manager and its role

u.c
(c) Buffered stream classes and their utility

(d) Uses of super keyword

ur
(e) Garbage collection

tG
en
m
ign
ss
UA
NO
IG

MCS–024 7,750
No. of Printed Pages : 3 MCS-024

om
MCA (Revised) / BCA (Revised)
Term-End Examination

.c
June, 2021

ru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES

u
AND JAVA PROGRAMMING

Time : 3 hours

tG Maximum Marks : 100


en (Weightage 75%)

Note : Question no. 1 is compulsory. Attempt any three


m
questions from the rest.
ign

1. (a) Compare Object Oriented and Procedure


Oriented approaches. Give salient features
ss

of both. 5
UA

(b) What is Dynamic Binding ? Explain the


advantage of dynamic binding. 5

(c) Explain Function Overloading with the


NO

help of suitable example. 5

(d) Explain why the main method in Java is


IG

always static. 5

MCS-024 1 P.T.O.
(e) What is an Interface ? Write a program to
show how a class implements two interfaces. 5

om
(f) What is Object Serialization ? Briefly
discuss the working of Object Serialization. 5

.c
(g) Compare StringBuffer Object with String
Object. When should StringBuffer Object be

ru
preferred over String Object ? 5

(h) What is Stream Tokenizer ? Discuss with

u
suitable example. 5

tG
2. (a) Discuss the life cycle of applet, with the
en
help of a suitable block diagram. 5

(b) What is a Stream Socket ? How is it


m
different from Datagram Socket ? 5

(c) Briefly discuss the different kinds of drivers


ign

used in JDBC. 5

(d) How do Servlets differ from Applets ?


ss

Briefly discuss the Servlet Life Cycle. 5

3. (a) What is RMI ? Briefly discuss the RMI


UA

object hierarchy. Discuss how distributed


applications are created using RMI. 10
(b) Write a JAVA program that overloads the
NO

function ‘SUM’ that computes the sum of


two integers and the sum of two float
valves. 5
IG

(c) Compare doGet() and doPost() method. 5


MCS-024 2
4. (a) What is a Literal ? How many types of

om
literals are there in Java ? 5

(b) Briefly discuss the term Garbage Collection.


Give advantages and disadvantages of

.c
Garbage Collection. 5

ru
(c) What are uses of final keyword in Java ? 5

(d) Explain how threads are created by

u
implementing Runnable Interface. What is

tG
thread priority ?
en 5

5. Write short notes on the following : 45=20

(a) Transient and Volatile Modifiers


m

(b) Random Access File and its Methods


ign

(c) TCP/IP Sockets

(d) Multidimensional Array in JAVA


ss
UA
NO
IG

MCS-024 3 P.T.O.
No. of Printed Pages : 3 MCS-024

om
MCA (Revised) / BCA (Revised)
Term-End Examination

.c
December, 2021

ru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND

u
JAVA PROGRAMMING

tG
Time : 3 hours en Maximum Marks : 100
(Weightage : 75%)

Note : Question no. 1 is compulsory. Answer any three


m
questions from the rest.
ign

1. (a) Compare data abstraction and data hiding.


Give an example of each. 5
ss

(b) Compare Inheritance and Polymorphism.


Give an example of each. 5
UA

(c) Why is Java called machine independent


and architecture neutral ? What is the role
NO

of JVM (Java Virtual Machine) ? 5

(d) Write a JAVA program to find the factorial


of a given number. Define appropriate class
IG

and methods. 5

MCS-024 1 P.T.O.
(e) What is an exception ? Write any three
actions that can be taken after an

om
exception occurs in a program. 5
(f) What are threads ? Explain how threads
are created by implementing Runnable

.c
Interface. 5
(g) What is serialization ? Differentiate

ru
between Transient and Volatile keyword. 5

u
(h) Discuss the architecture of Applet, with the
help of a suitable block diagram. 5

tG
2. (a) Briefly discuss the methods used by Applet
en
during their life cycle. 5
(b) What are proxy servers ? When should you
use anonymous proxy servers ? 5
m

(c) What is RMI ? Which protocol does it use ?


ign

Discuss the security problem in RMI. 5


(d) What is session tracking ? Discuss the role
of cookies in session tracking. 5
ss

3. (a) What is Java Bean ? Briefly discuss the


features of Java Beans. How does Java
UA

Bean differ from an instance of a normal


Java class ? 6
(b) Explain method overloading and method
NO

overriding. Give suitable example for each. 8


(c) What is Synchronization ? Why is it
important ? Explain the use of
IG

synchronized method in multithreading. 6

MCS-024 2
4. (a) What is the difference between & operator

om
and the && operator ? Give suitable
example for each. 5

(b) What is a constructor ? Explain the use of

.c
constructor with the help of a program. 5

ru
(c) What is finalize( ) method ? Write the
properties of finalize( ) method. Write the

u
declaration statement for finalize( )

tG
method. 5

(d) Compare en checked exceptions with


unchecked exceptions. Give an example for
each. 5
m
5. Write short notes on the following : 45=20
ign

(a) Methods Used for Interthread Communication

(b) Object Serialization and its Working

(c) Package in Java


ss

(d) AWT and Swing


UA
NO
IG

MCS-024 3 P.T.O.
No. of Printed Pages : 3 MCS-024

om
MCA (Revised) / BCA (Revised)
Term-End Examination

.c
June, 2022

ru
MCS-024 : OBJECT ORIENTED TECHNOLOGIES AND

u
JAVA PROGRAMMING

tG
Time : 3 hours en Maximum Marks : 100
(Weightage : 75%)

Note : Question no. 1 is compulsory. Answer any


m
three questions from the rest.
ign

1. (a) What is an abstract class ? How is it used to


implement polymorphism in Java ? Give
ss

suitable example in support of your answer. 5

(b) What is an applet ? Why is main( ) not


UA

included in writing a Java applet program ? 5

(c) Explain the process of inter-thread


NO

communication in Java, with the help of a


suitable example. 5

(d) Differentiate between throw with throws


IG

statement. Give example code for each. 5

MCS-024 1 P.T.O.
(e) What is classpath ? Explain the utility of
classpath, with the help of a suitable

om
example. 5
(f) Compare private and protected access
specifiers. Give suitable example for each. 5

.c
(g) Differentiate between Method-overloading
and Method-overriding, with the help of a

ru
suitable example. 5

u
(h) What is layout manager ? Explain any two
layouts in Java. 5

tG
2. (a) What are proxy servers ? Explain the usage
en
of anonymous proxy servers in designing
mailing applications. 6
(b) How does Servlet differ from Applet ?
m
Discuss all the phases of a servlet lifecycle. 7
ign

(c) Write a program in Java to copy the text


content of one file into another file. Support
your program with suitable comments. 7
ss

3. (a) What is StringBuffer class ? Write a


program in Java to append a given string to
UA

a StringBuffer object. 6
(b) Write a program to pass parameters to an
Applet using a web page. Also write the
NO

phases of an Applet lifecycle. 6


(c) What is an event in Java ? How does Java
handle events ? Write a program in Java to
IG

capture any event generated by keyboard. 8

MCS-024 2
4. (a) Write a Java program to create a Teacher

om
class and derive PGT, TGT and PRT classes
from Teacher class. Define appropriate
construction for all the classes. Also define
a method to display information of Teacher.

.c
Make necessary assumptions as required. 10

ru
(b) Write a Java program to set up JDBC and
execute an SQL statement on a database

u
table ‘BOOK’, with fields BOOK_ISBN,

tG
BOOK_AUTH, BOOK_PRICE,
BOOK_PUBL. The SQL statement should
en
find the BOOK_AUTH and BOOK_PRICE
of the BOOK having ISBN = 500123. 10
m
5. (a) What is an Exception ? Briefly explain the
causes of Exceptions. Describe how multiple
ign

exceptions are caught in Java, with the help


of a suitable program code. 10
(b) Write a Java program to print Fibonacci
ss

series, up to the nth term entered by the


user. Support your program with suitable
UA

comments. 5
(c) Explain the Java RMI architecture, with
the help of a diagram. 5
NO
IG

MCS-024 3 P.T.O.
No. of Printed Pages : 4 MCS-024

om
M. C. A. (REVISED)/B.C.A. (REVISED)

u.c
Term-End Examination
December, 2022

ur
MCS-024 : OBJECT ORIENTED TECHNOLOGIES
AND JAVA PROGRAMMING

Time : 3 Hours
tG Maximum Marks : 100
en
Weightage : 75%

Note : Question No. 1 is compulsory. Attempt any


m

three questions from the rest of the


ign

questions.

1. (a) What is method overloading ? Explain with


ss

suitable example. 5

(b) Explain the relationship between


UA

inheritance and polymorphism through an


example. 5
NO

(c) Distinguish between ‘Final’, ‘Finally’ and


‘Finalize’ keywords. Give example for each.
IG

P. T. O.
[2] MCS-024

(d) Explain container class, and discuss its

om
significance in Java GUI programming. 4

(e) Explain each component of the statement


‘public static void main (string args[ ])’. 5

u.c
(f) What is Java applet ? How is it different
from Java application program ? 5

ur
(g) Explain the Java RMI architecture with

tG
the help of a diagram. 5

(h) What is Java Bean ? Give advantages of


en
java beans in programming. 5
m
2. (a) Explain the usage of Grid Layout and Grid
Bag Layout in a Java Applet. 5
ign

(b) How String Class differs from String


Buffer Class ? Explain with suitable
ss

example. 5

(c) What is an applet ? Discuss all the phases


UA

of applet life cycle. 5


NO

(d) Explain GET and POST methods of servlet

programming, with the help of suitable


IG

code. 5
[3] MCS-024

3. (a) Write a java program to create a file

om
named ‘ignou-txt’ and write ‘Hello IGNOU’
in it. 6

(b) Write a java program for ‘writing output on

u.c
console’ using PrintWriter( ) method. Give
suitable comments for readability of your

ur
program. 6

(c) What is exception in Java ? What are the

tG
basic causes of occurrence of an exception ?
en
Write a program in Java, to show the
concept of exception handling. Support
m

your program with suitable comments. 8

4. (a) What is inheritance ? How is inheritance


ign

related to interface ? Explain, how multiple


inheritance can be implemented using
ss

interface in Java. Give suitable example.


UA

10

(b) Explain the steps of JDBC in establishing


NO

a connection for creating a dynamic


website for INSERT/UPDATE the
attendance record for employees of an
IG

organization. 10
P. T. O.
[4] MCS-024

5. (a) Write a Java program which takes two

om
3 × 3 matrices as input and find sum of the
two matrices ? Define constructor for
initializing the matrix object. Give suitable

u.c
comments for readability of your code. 10

(b) Write a Java program to print factorial of a

ur
number entered by user. 5

(c) Compare object oriented programming and

tG
structured programming. Give advantages
en
of object oriented progamming over the
structured programming. 5
m
ign
ss
UA
NO
IG

MCS–024
No. of Printed Pages : 4 MCS-024

om
MASTER OF COMPUER

u.c
APPLICATIONS (MCA) (REVISED)/
BACHELOR OF COMPUTER

ur
APPLICATIONS B.C.A. (REVISED)
Term-End Examination

tG
June, 2023
en
MCS-024 : OBJECT ORIENTED TECHNOLOGIES
AND JAVA PROGRAMMING
m

Time : 3 Hours Maximum Marks : 100


ign

Weightage : 75%
Note : Question No. 1 is compulsory. Attempt any
ss

three questions from the rest.


UA

1. (a) Explain the basic features of object

oriented programming language. 5


NO

(b) Why is Java called machine independent

language ? Explain the functionality of


IG

JVM. 5

P. T. O.
[2] MCS-024

(c) Differentiate between constructor and

om
method, give example for both. 5

(d) What is an abstract class ? Explain the use


of abstract class with an example. 5

u.c
(e) What are cookies and session variables ?
Briefly discuss the utility of both. 5

ur
(f) Explain the different steps in the life cycle

tG
of an applet. 5

(g) Discuss the relationship between data


en
abstraction and encapsulation. 5
m
(h) Explain the usage of container in Java
Applet and Servlet. 5
ign

2. (a) Explain how exception handling is


performed in Java. Briefly discuss the
ss

concept of checked exception and


unchecked exception, with an example of
UA

each. 10

(b) Briefly discuss the concept of listener in


NO

Java. Write a program in java to


implement mouse motion listener, support
IG

your program with suitable comments. 10


[3] MCS-024

3. (a) What is string class ? How is it different

om
from String Buffer class ? Write a java

program to find the length of a given

u.c
string. 7

(b) What is servlet ? Explain how session

ur
handling is performed in servlet

programming. 7

tG
(c) What is an Interface ? Write a java
en
program to show how a class implements

two interfaces. 6
m

4. (a) What is RMI in Java ? Write the steps to


ign

create stub and skeleton. 7

(b) Write a java program to create a volume


ss

class. Derive cube and sphere classes from


UA

it. Define constructor for these three

classes. 7
NO

(c) What is Synchronization ? Explain how

methods are synchronized in Java, with


IG

the help of an example. 6

P. T. O.
[4] MCS-024

5. Write short notes on the following : 5×4=20

om
(a) Dynamic Binding

(b) Stream Tokenizer

u.c
(c) JDBC Drivers

ur
(d) Function Overloading

tG
en
m
ign
ss
UA
NO
IG

MCS–024 7,070

You might also like