WBUT Exam Papers EE Object Technology And Uml B Tech 6th Sem 2012

WBUT Exam Papers EE

Object Technology And Uml  B Tech 6th Sem 2012


Time Allotted ; 3 Hours

The figures in the margin indicate full marks. Candidates are required to give their answers in their own words

as far as practicable.

GROUP – A | Multiple Choice Type Questions )

1. Choose the correct alternatives for the following :

10×1- 10

i)   Which one of the following lists contains only Java

programming language keywords ? ■

a)              class, if, void, long, int, continue

b)              goto, instance of, native, finally, default, throws

c)              try, virtual, throw, final, volatile, transient

d)             strictfp, constant, super, implements, do

e)              byte, break, assert, switch, include.

> <3

ii)             Which is a reserved word in the Java programming language ?

a) Method

c)   Subclasses



char cl= 064770;

  2. char c2 = face’;  
  3. char c3 = Oxbeef;  

char c4 = \u0022;

  5. char c5 = ‘\iface1;  

char c6 = ‘\uface’;

a) 1,2,

4 b)

c) 3, 5


5 only.
What is the numerical range of a char ?
a) -128 to 127 b) -(215) to (215)
iii) Which three are valid declarations of a char ?

c) 0 to 32767                         d) 0 to 65535.

v)            public void test (int x)

int odd = 1;

if (odd) /* Line 4 * /

• {System.out.printin (“odd”);


System.out.printin (“even”);

Which statement is true ?

a)           Compilation fails

b)           “odd” will always be output

c)            “even” will always be output

d)           “odd” will be output for odd values of x, and “even1 for even values.

vi)          public class while {

public void loop ( )

int x = 0;

while ( 1 ) /* Line 6 */

System.out.print (“x plus one (x + 1)); /* Line 8 */

Which statement is true ?

a)           There is a syntax error on line 1

b)           There are syntax errors on lines 1 and 6

I                                         X       .                           f

c)           There are syntax errors on lines 1, 6 and 8

d)          There is a syntax error on line 6.

vii)        public class Test { }

What is the prototype of the default constructor ?

a)              Test ()      b) Test (void>

c) public Test ()                      d) public Test (void).

viii)      Which is a valid keyword in java ?

a)             Static       b) String

c)            Float        d) Unsigned.

ix)         Java supports multiple inheritances.

a)           True

b)           False.

x)           Java is platform independent.

a)           True

b)           False.

GROUP -B ( Short Answer Type Questions )

Answer any three of the following.

  1. What is the difference between procedural language and object oriented language ?
  2. What is JVM ? Explain the process of compilation and interpretation in Java.
  3. What are parametric and non-parametric constructor ? %
  4. Explain with program.                        0                               2 + 3
  1. What do you mean by exception ? Explain user defined exception by a program.
  2. Create an applet having background color black and foreground color as white.

GROUP -C ( Long Answer Type Questions )

Answer any three of the following. 3 x 15 = 45

  1. a) What do you mean by method overloading and

overwriting ? Explain both with example.

b)           What are characteristics of abstract class ?

c)           What do you mean by package ?

What is Applet Stub Interface ? Describe the local applet and remote applet.

What is the difference between java applets and java application programs ?                                                          .

Write a java code to develop an abstract class “Geometric Object” which will have two variables colour and weight. It would have constructor function for setting the colour as “white” and the weight as 10 as default values. The class should have methods getColour () and getWeight() to return the colour and weight values to the caller. The class should have two abstract methods fmdArea() and Circumference().

What is AWT ? Differentiate between component class and container class.   §

9. a) What is Multithreading ? How to create a thread in Java ?

Differentiate between Checked Exceptions and Unchecked Exceptions ? Write a java program to

illustrate the lise of user-defined exception.

c)           What is the difference between throw and throws ?

d)         What is the role of Garbage collection ? Compare it with finalization. 4 + 2 + (2+3) + 4

10. a) What is polymorphism ? Explain the types of polymorphism present in java. Compare and contrast overloading and overriding methods with proper examples.

b)          Assume that a bank maintains two kinds of accounts for customers, one called as savings account and the other as current account. The savings account provides compound interest and withdrawal facilities but no chequebook facility. The current account provides chequebook facility but no interest. Current account holders should also maintain a minimum balance and if the balance falls below the level, a service charge is imposed.

Create a java class account that stores customer name, account number and type of account. From this derive the classes’ cur_acct and sav_acct to make them more specific to their requirements. Include necessary member functions in order to achieve the following tasks :

i)            Accept deposit from a customer and update the balance

ii)           Display the balance

iii)         Compute and deposit interest

iv)         Permit withdrawal and update the balance

v)          Check for the minimum balance, impose penalty, necessary, and update the balance.

Do not use any constructors. Use member functions to initialize the class members.

11. a) What is a Monitor ? How many threads at a time can

access a monitor ?

b)                Explain the difference between creating a thread by extending the Thread class and creating a thread by implementing the Runnable interface ?

c)                 Describe synchronization in respect to multithreading. Write a simple java program which will synchronize between two threads.

d)                What are all the values for the max-priority, min-priority and nor-priority level ?

Leave a Comment