How To Exam?

a knowledge trading engine...


West Bengal Institute of Technology (WBIT) 2009-6th Sem B.Tech Computer Science and Engineering Computer Science -Object Technology & UML - Question Paper

Wednesday, 17 July 2013 03:45Web



I

CS/B.TECH(CSE)/SEM-6/CS-605/09    3


ENGINEERING & MANAGEMENT EXAMINATIONS, JUNE - 2009

OBJECT TECHNOLOGY & UML SEMESTER - 6




[ Full Marks : 70

Time : 3 Hours J


GROUP - A ( Multiple Choice Type Qneitiom)

1. Choose the correct alternatives for any ten of the following :

10 x 1 - 10


i) The method int func(int i, int J) {} can be overloaded using

A)    int func (int i, int J, int k ) {}

B)    int func (float i, int j ) {}

C)    float func (int i, int j ) {}

D)    int func (int a, int b ) {}

E)    float func (int I, int j, float k ) {}

a) (B) & (C)

b)

d)


(C) & (D)

(A), (B) & (E).


c) (A), (B), (C) & (E)

int j;

ii)


for (int i = 0; i < 14; i ++ ) { if (i < 10 ) { j = 2 + i;

}

System.out.println ("j:" + j+" i:" + i);

}

What is WRONG with the above code ?

a)    Integer "j" is not initialized

b)    Nothing

c)    You cannot declare integer I inside th for-loop declaration

d)    The syntax of the "if' statement Incorrect

e)    You can not print integer values without converting them to strings.

ill) What will happen if you compile / run this code ? public class Q1 extends Thread {

public void run ()

{

System.out.println ("Before start method"); this.stop ();    .

System.out.println ("After stop method");

}

public static void main (String [ ] args)

{

Q1 a = new Ql ();

a.start ();

}

}

a)    Compilation error at line 7

b)    Runtime exception at line 7

c)    Prints "Before start method" and "After stop method".

d)    Prints "Before start method" only.

Iv) Which one of the following is a valid declaration of an Applet ?

a)    Public class MyApplet extends java.applet.Applet {

b)    Public Applet MyApplet {

c)    Public class MyApplet extends applet implements Runnable {

d)    Abstract class MyApplet extends Java, applet .Applet {

e)-    Class MyApplet implements Applet {

a) 0 to 216    b) 0 to 215

c) 0 to 216 - 1    d) 0 to 215 _ i

vi)    Aggregation ( encapsulation ) relationships are represented in the UML notation by

v     '    -

sQ nesting of classes

b)    lines with a solid diamond at one end

c)    lines with a hollow diamond at one end

d)    lines with an arrow at one end

e)    lines without an arrow at either end.

vii)    A sequence diagram Is

a)    a time-line Illustrating a typical sequence of calls between object function members

b)    a call tree Illustrating all possible sequences of calls between class function members

c)    a time-line illustrating the changes in inheritance and Instantaneous relationships between classes and objects over time

d)    a tree Illustrating inheritance and relationships between classes

e)    a directed cyclic graph illustrating inheritance and instantaneous

relationships between classes and objects,

viii) Which of the following are true ?

a)    The InputStream and OutputStream classes are Byte-oriented.

b)    The ObjectlnputStream and ObjectOutputStream do not support serialized object input and output.

c)    The Reader and Writer classes are Character-oriented.

d)    The Reader and Writer classes are the preferred solution to serialized

object output.

ix)    What is an example of polymorphism ?>

a] Inner class    b) Anonymous classes

c) Method overloading    d) Method overriding.

x)    Exception is defined in which package ?

a) java.util    b) java.lang

c) Java.awt    d) Java.io.

xi)    The relation between classes can be represented by

a) polymorphism    b) method

c) message    d) inheritance.

xii)    switch (i) {

default:    .

System, out.println ("Hello");

What is the acceptable type (s) for the variable i ?

a) int    b) double

c) object    d) byte.

xiii) The import statement is always

a)    the first non-comment statement in a Java program file

b)    the default non-comment statement in Java program file

c)    a non-comment statement and can be defined anywhere in the program

d)    none of these.

xiv)    Method overloading occurs only when

a)    the names and the type signature of two methods are not identical

b)    the names and the type signature of two methods are identical

c)    the names and the return types of two methods are identical

d)    only the names are identical.

xv)    An Actor is someone or something

a)    that must interact with the syjstem

b)    that always external to the system

c)    that Eire not part of the system

d)    all of these.

GROUP - B ( Short Answer Type Questions)

Answer any three of the following.    3x5=15

2.    What is byte code ? What does the JVM do ? Why is Java called compiler-interpret language ?    2 + 3

3.    Discuss Applet life-cycle indicating the functions.    5

4.    a) What is an Actor ?

b) Describe the Metaclass. Is it different from Metadata 7    2 + 3

5.    What is the base class of Error and Exception ? Differentiate between throw and throws.    1+4

6.    a) What is Late binding ?

b) Describe major and minor elements of Object Oriented Analysis.    1+4

7.    a) Write down the similarities and differences between interfaces and classes.

b) Discuss the various levels of access protection available for package and their implementation.    2 + 3

\

GROUP -C (Long Answer Type Questions )

Answer any three questions.    3 x 15 = 45

8.    What are the primary goals of UML ? What is the difference between state chart diagram and activity diagram ? Model an activity diagram for the usecase of a driver

starting a car. Explain the sequence diagram and collaboration diagram with an

/

example used In UML.    5 + 5 + 5

9.    a) What are Java "thread" and "monitor" ?

b)    Distinguish between "dynamic binding" and "Message passing"

c)    What is 'Template" and "Package" with example.    5 + 5 + 5

10.    a) What is meant by aggregation ? And explain the different types of aggregation.

b)    What are the differences between a sequence diagram and a collaboration diagram?

c)    Draw a sequence diagram for the cellular phone connection.

d)    Draw object diagram for the following object classes, with association names attributes and additional object classes if required.

Object classes : college, playground, principal, classroom, board, book, student, faculty, cafeteria, ruler, door, swing.    4 + 3 + 3 + 5

11.    What is multi-threadlng ? Write a program which can run a main thread and child thread simultaneously. What synchronized keyword does ? Briefly describe with example.    '    2 + 5 + 2 + 6

12.    a) How inheritance is incorporated in Java ? Is it possible in Java to implement

multiple inheritance ? If not then how is it possible explain ?    7

b) What is an interface ? What are the differences between interface and abstract class ? Give one example in Java to implement one interface.    8

END

.6841 (15/06)







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER West Bengal Institute of Technology (WBIT) 2009-6th Sem B.Tech Computer Science and Engineering Computer Science -Object Technology & UML - Question Paper