WBUT Previous Years Question Papers EE Object Technology And Uml B Tech 6th Sem 2011

WBUT Previous Years Question Papers EE

Object Technology And Uml  B Tech 6th Sem 2011

 

Time Allotted : 3 Hours

FUll Marks : 70

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 x 1 ~ 10

i) Which of the following statements are false about sequence diagrams ?

a)         Sequence diagrams can also capture concurrent activities

b)         Activations should not be used for concurrent activities

c)         Asynchronous message is represented by “half­arrow”

d)         Asynchronous message blocks the caller until if is completed.

ii)           Delegation model is associated with

a)           Garbage collection

b)           AWT

c)            Exception handling

d)           Event handling.

iii)         From any non-sub-class Class outside the package, which access is possible ?

a)               Public                               b) Protected

c)                Default                             d) All of these.

iv)         Which statement is false ?

a)           A class cannot be both final and abstract

b)           Abstract methods end in a semicolon-no curly braces

c)           An interface can have only abstract methods, no concrete methods allowed

d)           All statements are purely true.

v)           After ‘the following code fragment, what is the value in

a ?

String s; int a;

s = “Foolish boy.”;

a = s.indexOf (“fool”);

a)               – 1                                     b) °

cj 4       d) Random value.

vi)         What is the mechanism that binds together code and the data it manipulates and keeps both safe from outside ?

a) Encapsulation                         b) Class

c) Inheritance                              d) Polymorphism.

vii)        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 not identical

d)          only the names are identical.

viii)      What is the purpose of a class constructor ?

a)           To make objects initially have certain values when they are instantiated

b)          To instantiate an object

c)           To extend a class

d)          To pass values to methods for a class.

ix)         Which view consists of few key scenarios or use-cases that are used to drive and validate the architecture ?

a)   Logical view                            b) Implementation view

c)    Deployment view               d) Use-case view.

x)           Which of the following assignments are valid in Java ?

a)           float x = 123.4;

b)          long m = 023;

c)           int n = (int)false;

d)          double y = 0X756;

GROUP -B ( Short Answer Type Questions )

Answer any three of the following. ^ 3×5=15

2. a) why is UML called a modelling language and not an implementation language ?

Ib)          What is the difference between sequence diagram and

collaboration diagram ?

  1. Discuss Applet life-cycle indicating the functions.
  2. What are wrapper classes ? Why do we need wrapper

classes ?’ What is the difference between Error and an

Exception ?

  1. What is byte code ? What does the JVM do ? Why Java is

called compiler-interpreter language ?

  1. Describe the concept of multiple inheritance with an example. What do you mean by polymorphism ?

GROUP -C ( Long Answer Type Questions )

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

What are the primary goal’s of UML ?

Describe the class diagram and use-case-diagram.

Draw a state-chart diagram showing the different states of a process.

A passenger calls the lift from its current floor and after entering the lift the passenger presses the destination button. The lift on arrival at destination will wait for next response up to a time limit. If there is no response within the time, the lift will go back to the ground floor. Represent these features with the help of state diagrams. ‘                                                                                  2 +

What are the rules for method overriding ? Explain dynamic method dispatch in method overriding with

proper example.

Compare between constructor overloading vs method overloading.

What is thread ? Write down the benelits ol multithreading.

  1. a) Define links and associations. State an example of

many-to-many association.

b)           What is qualified and non-qualified association ? Describe with an example for each case.

c)            Give an example of a multilevel inheritance hierarchy with instances.

  1. a) How many types of inheritance’ are in JAVA ? What are those ?

b)           There are three classes. Box, Boxweight and Boxshipment.

The member variables of the Box class, are height, width and depth. And there is a method. volumeO which will calculate the volume of the box.

The boxweight class also contain the above variables ( height, width and depth ) and also contain an extra variable that is ‘weight’ – which denote the weight of the box.

The Boxshipment class contain the above variables ( height, width and depth, weight ) and also contain an extra variable that is ‘cost – which denote the cost for shipment.

Write a program in JAVA that will calculate the volume of the box and print the value of the weight and cost of that box using concept of multilevel inheritance. 5+10

. a) Explain activity diagram through an example.

b)             Suppose a company executes multiple projects. Each project must have one or activities, and each activity may only belong to a single project. Project class contains two attributes : Name and Start Date. Activity class contains three attributes : Number, Start date and hours. You have to provide getter-setter methods for the attributes. These methods are public. Attributes should be private. Express this scenario with a class diagram.

c)             What do you mean by cohesion ? Differentiate coupling and cohesion.

Leave a Comment