23
Department of Computer Science & Technology, UTU 2014 Mr. Jitendra V. Nasriwala Page 1 M. Sc. (C. A.) 2 nd Semester 040020201-Object Oriented Application Development Unit 1: Introduction to Object Oriented Modelling Concept Que: 1 Answer the following question in short. [1 mark each] 1. What do you mean by object orientation? 2. Define an object and a class. Differentiate between a class and an object? 3. What do you mean by an identity? 4. What are sub classes and super classes? 5. Define term abstraction. 6. What do you mean by inheritance in object oriented systems? Why is it useful? Give an example of inheritance. 7. What do you understand by the term polymorphism in object oriented system? Why is it useful? Give an example of polymorphism. 8. What is UML? 9. Define link and association. 10. What is association? What are its types? 11. What is an association class? 12. Differentiate between order and bag. How it can be modelled? 13. What do you mean by reification? When it is useful? 14. What do you mean by multiplicity? Give its type. 15. What are the difference between an abstract class and a concrete class? 16. Differentiate between method and operation. 17. What do you mean by qualified attribute? 18. Define the following terms: Derived Element, Events, and Qualifier. 19. What do you mean by synergy? 20. List and describe all the phases of software development using object oriented approach. 21. How does domain class modelling, differs from application class modelling? 22. What is nested state? 23. What is package? Que: 2 Answer the following question in short. [2-3 marks each] 1. What is object oriented modelling? 2. What do you mean by abstract class and abstract operation? 3. Differentiate between functions, operations and methods. 4. Define the following terms: Aggregation, Tagged Value, and Realization. 5. What do you mean by inheritance in object oriented systems? Why is it useful? Give an example of inheritance. 6. What is model? Give purpose of modeling. 7. Describe multiplicity for an attribute. 8. What do you understand by the term polymorphism in object oriented system? Why is it useful? 9. State the difference between ordered, bag and sequence attributes? 10. Give any two point of difference between aggregation and composition. 11. What is the purpose of guard condition? How it can be modelled in state chart diagram? 12. What do you mean by reification? What are it’s advantages? 13. What do you mean by event and transition? 14. What do you mean by signal? 15. What do you mean by triggering? 16. What do you mean by multiplicity? How it can be described? 17. What are two types of whole-part relationship? 18. What are the difference between an abstract class and a concrete class? 19. Differentiate between method and operation. 20. What do you mean by qualified attribute?

M. Sc. (C. A.) 2 Semester - UTU | Uka Tarsadia University ...utu.ac.in/dcst/download/documents/QBMSCCA040020201.pdfDepartment of Computer Science & Technology, UTU 201 4 Mr. Jitendra

Embed Size (px)

Citation preview

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 1

M. Sc. (C. A.) 2nd Semester 040020201-Object Oriented Application Development

Unit 1: Introduction to Object Oriented Modelling Concept

Que: 1 Answer the following question in short. [1 mark each]

1. What do you mean by object orientation?

2. Define an object and a class. Differentiate between a class and an object?

3. What do you mean by an identity?

4. What are sub classes and super classes?

5. Define term abstraction.

6. What do you mean by inheritance in object oriented systems? Why is it useful? Give an example of

inheritance.

7. What do you understand by the term polymorphism in object oriented system? Why is it useful? Give an

example of polymorphism.

8. What is UML?

9. Define link and association.

10. What is association? What are its types?

11. What is an association class?

12. Differentiate between order and bag. How it can be modelled?

13. What do you mean by reification? When it is useful?

14. What do you mean by multiplicity? Give its type.

15. What are the difference between an abstract class and a concrete class?

16. Differentiate between method and operation.

17. What do you mean by qualified attribute?

18. Define the following terms: Derived Element, Events, and Qualifier.

19. What do you mean by synergy?

20. List and describe all the phases of software development using object oriented approach.

21. How does domain class modelling, differs from application class modelling?

22. What is nested state?

23. What is package?

Que: 2 Answer the following question in short. [2-3 marks each]

1. What is object oriented modelling?

2. What do you mean by abstract class and abstract operation?

3. Differentiate between functions, operations and methods.

4. Define the following terms: Aggregation, Tagged Value, and Realization.

5. What do you mean by inheritance in object oriented systems? Why is it useful? Give an example of

inheritance.

6. What is model? Give purpose of modeling.

7. Describe multiplicity for an attribute.

8. What do you understand by the term polymorphism in object oriented system? Why is it useful?

9. State the difference between ordered, bag and sequence attributes?

10. Give any two point of difference between aggregation and composition.

11. What is the purpose of guard condition? How it can be modelled in state chart diagram?

12. What do you mean by reification? What are it’s advantages?

13. What do you mean by event and transition?

14. What do you mean by signal?

15. What do you mean by triggering?

16. What do you mean by multiplicity? How it can be described?

17. What are two types of whole-part relationship?

18. What are the difference between an abstract class and a concrete class?

19. Differentiate between method and operation.

20. What do you mean by qualified attribute?

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 2

21. Define the following terms: Derived Element, Events, and Qualifier.

22. List and describe all the phases of software development using object oriented approach.

23. How domain class modelling differs from application class modelling?

24. What is nested state?

Que: 3 Answer the following question in details. [6 marks each]

1. Explain characteristics of object oriented approach.

2. Explain inheritance with appropriate example.

3. How structural things can be represented in UML?

4. Explain elements of class diagram.

5. What is link and association? How it can be describe in class diagram?

6. What is aggregation? Explain with appropriate example.

7. List activity performed during system design in object oriented software development approach? Explain any one

in detail.

8. Explain how relationship can be described in class diagram?

9. Explain UML notation used for class and object. Describe it in detail.

10. What are the elements of state chart diagram? Explain each with UML notation.

11. What do you mean by nested state? How are they organized? Also explain concurrency of

states within a state diagram.

12. Explain the common architectural styles applied for system design.

13. What do you understand by interaction? How to model interactions in UML using sequence and

collaboration diagram? Explain giving suitable example.

14. Describe the construction of domain class model with steps.

15. List different architectural styles of system. And explain any two of them.

16. Draw (1) use case diagram, (2) activity diagram and (3) class diagram and (4) sequence diagram for

the following system. For a site of a Restaurant which allow three kind of user (1) guest (2) platinum and (3)

administrator

a. Guest user can view the content of site (i.e. (i) types of cuisine, rate of cuisine, (ii)

venue of restaurant and can (iv) registered to the site etc.)

b. Platinum user can (i) do all the task done by guest user and (iii) can book the table,

(iii) get the discount e-coupon, (iv) get the service of home delivery for their order of

food, (v) get the benefits of festival offer release by the restaurant etc.

c. Administrator can (i) manage users, (ii) introduce the new offer, (iii) can put the offer

and messages on e-notice board of the site, (iv) get the feedback from the all users

etc.

17. Draw (1) use case diagram, (2) activity diagram and (3) class diagram and (4) sequence

diagram for the following system. For an online exam’s web site

a. Unregistered user can appear for demo exam and get the result of exam for a single subject.

b. Registered user can appear for the online exam of a single subject at a time and can

answer the questions asked. One question is display per page. He/she can move next

page or previous page during the exam for answering the question. Online Result will

be declared immediately after the completion of exam.

c. No negative marking for a wrong answer.

Que: 4 Select most appropriate answer from the given option. [1 mark each]

1. A class is

a. a group of objects

b. template for objects of a particular type

c. a class of objects

d. a classification of objects

2. All object have a

I. Attributes

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 3

II. States

III. a set of operations

IV. a unique identity

a. i, ii, iii

b. ii, iii, iv

c. iii, iv

d. i, ii, iii, iv

3. The following are intangible entities which can be defined as objects

I. a motor car

II. a bank account

III. an aircraft

IV. a linked list

a. i, ii

b. ii, iv

c. iii, iv

d. ii, iii, iv

4. In UML diagram of a class

a. state of object cannot be represented

b. state is irrelevant

c. state is represented as an attribute

d. state is represented as a result of an operation

5. Attributes are assigned value

a. when operations are performed on an object

b. when instances of objects are defined

c. when methods are invoked

d. when classes are identified

6. In object-oriented design

a. operations and methods are identical

b. methods specify algorithms whereas operations only state what is to be done

c. methods do not change values of attributes

d. methods and constructor are same

7. By abstraction in object-oriented modelling we mean picking

a. only attributes appropriate to model an object

b. only operations

c. both operation and attributes with operations appropriate to model an object

d. the appropriate abstract data type

8. By encapsulation in object-oriented modelling we mean

a. encapsulating data and programs

b. hiding attributes of an object from users

c. hiding operations on object from users

d. hiding implementation details of methods from users of objects

9. Encapsulation in object-oriented modelling is useful as

a. it allows improving methods of an object independent of other parts of system

b. it hides implementation details of methods

c. it allows easy designing

d. encapsulates attributes and operations of object

10. Objects may be viewed as

a. clients in a system

b. servers in a system

c. as both clients and servers in a system

d. neither as clients nor as servers in a system

11. Inheritance in object-oriented system is used to

a. create new classes from existing classes

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 4

b. add new operations to existing operations

c. add new attributes to existing attributes

d. add new states to existing states

12. Inheritance in object-oriented modelling can be used to

a. generalize classes

b. specialize classes

c. generalize and specialize classes

d. create new classes

13. When a subclass is created using inheritance the resulting class

a. May have only attributes of parent class.

b. Many have only operation of parent class.

c. may have new operations only in addition to those in parent class

d. may have new attributes and new operations in addition to those of the parent class

14. By polymorphism in object-oriented modelling we mean

a. the ability to manipulate objects of different distinct classes

b. the ability to manipulate objects of different distinct classes knowing only their common properties

c. use of polymorphic operations

d. use of similar operations to do similar things

15. A polymorphic operation

a. has same name

b. has same name but uses different methods depending on class

c. uses different methods to perform on the same class

d. uses polymorphic method

16. Given a word statement of a problem potential objects are identified by selecting

a. verb phrases in the statement

b. noun phrases in the statement

c. adjectives in the statement

d. adverbs in the statement

17. Given a word statement of problem potential operations appropriate for objects are

identified by selecting

a. verb phrases in the statement

b. noun phrases in the statement

c. adjectives in the statement

d. adverbs in the statement

18. In Object oriented software development process, during which stage system analyst devise a

high-level strategy-the architecture-for solving the application problem.

a. System Conception

b. Analysis

c. System Design

d. Class Design

Que: 5 True/False Questions [1 mark each]

1. The class model is used to describe static structure of the system.

2. The object diagram is used to examine changes of the objects and relationships over time.

3. An object describes a group of objects with the same properties, behavior, kind of relationships and semantics.

4. Class diagrams shows individual object and its relationships.

5. Object state is always changed to different state after the transition.

6. A change condition is checked only once, while guard condition checked continuously.

7. A Class diagram is a graph whose nodes are states and whose directed arcs are transition between states.

8. Link and association are related with each other.

9. State name must be unique within the scope of state diagram.

10. Solid circle denotes end of the state diagram or final state.

11. If an event has to occur after the completion of some event or action, the event or action is

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 5

called the guard condition.

12. The aggregate is semantically an extended object that is treated as a unit in many operations,

although physically it is made of several lesser objects.

13. In composition, constitute part may or may not depend on aggregate object.

14. The filled diamond arrow is used to define a general form of aggregation.

15. In composition part(s) are usually expected to “live” and “die” with the whole (“cascading

delete”).

16. If two objects are tightly bound by a part-whole relationship, it is an aggregation, while two

objects are usually considered as independent, even though they may often be linked, it is an

association.

17. An abstract class can be directly instantiated.

18. An abstract class is meaningless without concrete subclasses.

19. A class with at-least one abstract operations is automatically an abstract class.

20. Constraints on objects can be described through multiplicity.

21. Object Constraint Language can be used to specify constraints.

22. Domain integrity rules are used to govern the nature of records in a one-to many

relationships.

23. Constraints allow creating a new building block by extending the vocabulary of UML.

24. Constraint is a user defined condition.

25. Package is the group of elements i.e. classes, association.

Que 6: Fill in the blanks. [1 mark each]

1. Two sub stages of analysis during Object Oriented Software Development are________________________ and

___________________________.

2. During the analysis, _____________________ that address the computer aspects of the application that are

visible to user.

3. The __________ model is used to describe static structure of the system.

4. An _____________ is a data type that has a finite set of values

5. An _________ is a strong form of association in which object is made of constituent part

6. More restrictive form of aggregation is _____________.

7. An_________ is a class that cannot be directly instantiated.

8. A class that can be directly instantiated is referred to as a ____________.

9. A ______________________ is an operation with an implementation.

10. A __________ is an abstraction of the values and links of an object

11. A _________ is an instantaneous change from one state to another

12. A __________ is a Boolean expression that must be true in order for transition to occur.

13. Initial state is denoted by ____________ while final state denotes by __________ in state diagram.

14. An _______ indicating the Object to transition from one state to the other.

15. Promotion of something that is not an object into an object is known as ____________.

16. The same operation may apply to many different classes - such an operations is known as _________.

17. The ______ model describes the sequences of operations that occur in response to external stimuli.

18. An ________ represent external stimuli and ________ represent values of objects.

19. Two event may be unrelated known as ___________.

20. A __________ is an explicit one-way transmission of information from one object to another.

21. A __________ is a message between objects while a signal event is an occurrence in time.

22. A ________ is an event that is caused by the satisfaction of a Boolean expression.

Unit 2: State Modelling and Interaction Modelling

Que: 1 Answer the following question in short. [2-3 marks each]

1. What is the difference between a use case description and an activity diagram?

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 6

2. Why do actors have “hands”?

3. What is the <<include>> relationship used for?

4. What is the <<extend>> relationship used for?

5. What do you mean by use case scenario?

6. What is the purpose of sequence diagram?

7. What is the purpose of collaboration diagram?

8. What is the purpose of activity diagram?

9. Define activity.

10. What are the approaches of identifying use case?

11. What is an event? How it can be use to identify use case?

12. What are the elements of collaboration diagram?

13. What are the elements of sequence diagram?

14. What are the elements of activity diagrams?

15. What do you mean by forks in activity diagram?

16. What do you mean by swim lanes in activity diagrams?

17. Which three models are most used to do object oriented modelling?

18. What notation is used to indicate stereo type?

19. What do you mean by pattern?

20. What do you mean by framework?

21. List and draw components of state diagram.

22. How do you decide operations for an internal class?

Que: 2 Answer the following question in details. [6 marks each]

1. What are the elements of Use Case Model? Explain each with its notation.

2. What is the purpose of a system sequence diagram? What symbols are used in a sequence diagram?

3. What are the steps required to develop a system sequence diagram?

4. How behavioural things represent in UML ?

5. “UML is a language” - justify the statement. Also, explain the building blocks of UML.

6. Explain any 4 Structural things of UML diagram.

7. Describe the reification of behavior.

8. List all the diagrams of UML? Also give its purpose.

9. What is system architecture? Explain different view of system architecture.

10. What do you mean by use case? How it can be describe?

11. How different relationship can be organized in use case? Explain with example.

12. What are the advantages of use case diagram?

13. Explain relationship in use case diagram with examples.

14. Create use case diagram for the following systems.

a. Order processing system

b. Student Information System

c. Online book store

d. Video rental system

15. Describe elements of activity diagram.

16. Define guard condition. How it can be model in state diagram?

17. Buses come to a garage for repairs. A mechanic and helper perform the repair, record the reason for the repair

and record the total cost of all parts used on a Shop Repair Order. Information on labor, parts and repair outcome

is used for billing by the Accounting Department, parts monitoring by the inventory management computer

system and a performance review by the supervisor.

18. i) Create a use case diagram for above system.

19. ii) Create an activity diagram for above system.

20. A hostel warden states the following extended requirements for an existing hostel information system: "Our

hostel has 500 rooms and 4 messes. Currently, there are 1000 students all in 2, 3 & 4 seated rooms. They eat in

any one of the messes but can get a rebate if they inform and do not eat for at least 4 consecutive days. Besides

normal menu, extra items are also given to students when they ask for it. Such extras are entered in an extras

book. At the end of the month a bill is prepared based on the normal daily rate and extras and given to each

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 7

student. We find that bill preparation is delayed. We are also not able to keep proper track of payments and

billing for extras. We need a system to streamline this".

21. i) Create class diagram for above system.

22. ii) Create a use case diagram for above system.

23. Sams Music Records is a mail-order company that distributes CDs and tapes at discount prices to record club

members. When an order processing clerk receives an order form, he or she verifies that the sender is a club

member by checking the Member file. If the sender is not a member, the clerk returns the order along with a

membership application form. If the customer is a member, the clerk verifies the order item data by checking

the Item file. Then the clerk enters the order data and saves it to the Daily Order file. The clerk also prints an

invoice and shipping list for each order, which are forwarded to shipping department. Problem with manual

system is that they are not able to manage members, their subscriptions, maintaining stock and shipping of

order.

24. Create a class model for the above system.

25. Create a use case diagram for above system.

26. Create a sequence diagram for any two important use cases from the above system.

Que: 3 Select most appropriate answer from the given option. [1 mark each]

1. Use case construction is a technique used for:

a. requirements determination.

b. requirements structuring.

c. user interface design.

d. database design.

2. A use case represents:

a. a class, its attributes and operations.

b. an operation’s interface and signature.

c. the system’s functionality for a particular purpose.

d. the role a user plays when interacting with the system.

3. An external entity that interacts with a system is called a(n):

a. use case.

b. actor.

c. stakeholder.

d. association.

4. In UML notation, an ellipse signifies a(n):

a. Actor

b. class.

c. use case.

d. system boundary.

5. The <<extend>> relationship between use cases would be used when behavior in the extending use

case is ____________ the extended use case.

a. always needed by

b. never needed by

c. sometimes needed by

d. unrelated to

6. The systems analysis portion of a development project involves all the following tasks EXCEPT:

a. creating design elements.

b. determining systems requirements.

c. selecting design strategies.

d. structuring systems requirements.

7. ____________ classes are those whose primary focus is to hold persistent data.

a. Boundary

b. Relational

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 8

c. Entity

d. Database

8. ___________ classes are those that provide interaction to the system for actors.

a. Use case

b. Boundary

c. Interface

d. Control

9. Processing of main application logic and coordination of tasks in a use case is implemented in ____________

classes.

a. application

b. use case

c. coordination

d. control

10. The UML ____________ diagram is a time-ordered interaction diagram.

a. activity

b. message

c. sequence

d. collaboration

11. Message implementation is the responsibility of the object:

a. representing the actor.

b. controlling the application.

c. sending the message.

d. receiving the mess

12. Which if the following belong to UML behavioral diagrams:

a. Class and object diagram

b. Use case diagram and sequence diagram

c. Collaboration diagram and state-char diagram

d. A and B

e. B and C

13. Which of the following UML diagrams is part of UML structural diagram?

a. Class diagram

b. Sequence Diagram

c. Object Diagram

d. A and B

e. A and C

14. An 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 instantiation relationships

between classes and objects over time

d. a tree illustrating inheritance and relationships between classes

e. a directed acyclic graph illustrating inheritance and instantiation relationships

between classes and objects

Que: 4 True/False Questions [1 mark each]

1. The dynamic portion of UML model is modelled using Structural Thing.

2. A bag is an ordered collection of elements which allow duplicate values.

3. Scenarios are considered as instances of use case.

4. A collaboration diagram is an interaction diagram that emphasizes on time ordering of messages.

5. Class design is a high-level plan or a strategy adopted to resolve the application problem.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 9

Unit 3: Object Oriented Analysis and Design

Que: 1 Answer the following question in short. [1 mark each]

1. Define the term System conception.

2. What is class design in the context of system conception?

3. Define implementation in the context of system conception?

4. Define domain analysis.

5. List out the aspects of object in which analysis model addresses.

6. Define use case.

7. List out the step to construct the application state model.

8. Define system design.

9. Define the design pattern.

Que: 2 Answer the following question in short. [2-3 marks each]

1. Define analysis in the context of software development. List out the sub stage of analysis.

2. State any two the differences between domain analysis and application analysis.

3. What is system design in the context of system conception?

4. What is testing in the context of system conception?

5. List out the ways to find new system concept.

6. List out the steps must be performing to construct the domain class model.

7. List out the steps that we can construct an application interaction model.

8. How the system can be break into sub system?

9. How to identify the concurrency in the system? Explain with an appropriate example.

10. List out the types of global resource that must be identified by the system designer.

Que: 3 Answer the following question in details. [6 marks each]

1. Write a note on software development process using object oriented approach.

2. Write a note on system conception.

3. Write a note on software development life cycle.

4. Write a note on waterfall development model.

5. Write a note on interactive development model.

6. How anyone can identify whether the system concept is good or not?

7. Write down the system concept for the ATM for the following question.

a. Who is applicable for?

b. What problem will it solve?

c. Where will it be used?

d. When is it needed?

e. Why it is needed?

f. How will it work?

8. How to prepare the problem statement for any software?

9. Write down the problem statement for the ATM.

10. Consider a new antilock braking system for crash avoidance in an automobile. Elaborate the following high

level questions and explain answer.

a. Who is the applicable for? Who are the stakeholders? Estimate how many persons in your country are

potential customers.

b. Identify three features that should be included and three features that should be omitted.

c. Identify three system with which it must work.

d. What are two of the largest risks?

11. Write a note on domain class model.

12. Write a note on domain state model.

13. Write a note on domain interaction model.

14. For each of the following system, identify the relative importance of the three aspect of modelling. 1) class

modelling 2)state modelling 3) Interaction modelling

a. Compiler

b. Bridge player

c. Electronic type writer

d. Telephone answering machine

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 10

15. Write a note on application interaction model.

16. Write a note on application state model.

17. Prepare a scenario for printing and processing preregistration forms for the scoring system. In the scenario two

children should change their address and another two children should indicate that they are unable to attend.

Assign a number to each contestant.

18. Prepare an activity diagram for the following computation. Show swim lanes for competitor, computer

operator, judge and scorekeeper.

The computer operator calls the competitor’s number as it appears on the display. The competitor verifies her

number and then performs the figure. The three judge hold up their scores. A scorekeeper reads the scores. As

they are read, the computer operator enters them into the computer.

19. Write a note on system design with all its stage that must followed during system design.

20. Write a note on class design with all it’s steps.

Que: 5 True/False Questions [1 mark each]

1. System conception deals with the genesis of an application.

2. The waterfall approach is suitable for well-understood application with predictable output from the analysis

and design.

3. Iterative model is more flexible and minimize the risk of failure.

4. Analysis begins with a problem statement generated during system conception.

5. In system analysis the problem statement should not be taken as immutable, but rather as a basis for refining

the requirements.

6. The focus of domain modelling is on building a model of intrinsic concept.

7. After identified the basic use case we can organize them with relationship.

8. Activity diagram is use to document business logic.

9. Activity diagram cannot be use as an excuse to begin premature implementation.

Unit 4: Overview of Java

Que: 1 Answer the following question in short. [1 mark each]

1. What was the name of the person primarily credited for creating a Java language?

2. List out the three key edition of Java.

3. List out the IDE’s commonly use in Java application.

4. Define default package in the context of Java programming.

5. List out the primitive data types in Java.

6. List out the reference data types in Java.

9. What would be the output of the following program?

class Staticeg{

final static int i = 0;

public void set(){

i = 1;

}

}

class StaticeExample{

public static void main(String []args){

Staticeg strex = new Staticeg();

int k = Staticeg.i * 5;

System.out.println(“The value of k is”+k);

}

}

11. How do you overcome variable shadowing problem?

12. What is null reference?

13. What would be the output of following program?

class TestPrint{

public static void test(){

this.print();

}

public static void print(){

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 11

System.out.println(“In the print method”);

}

public static void main(String []args){

test();

}

}

14. Which operator provides dynamic memory allocation?

15. What will be the output of the program?

public class Switch2

{

final static short x = 2;

public static int y = 0;

public static void main(String [] args)

{

for (int z=0; z < 3; z++)

{

switch (z)

{

case x: System.out.print("0 ");

case x-1: System.out.print("1 ");

case x-2: System.out.print("2 ");

}

}

}}

16. What will be the output of the program?

public class If2

{

static boolean b1, b2;

public static void main(String [] args)

{

int x = 0;

if ( !b1 ) /* Line 7 */

{

if ( !b2 ) /* Line 9 */

{

b1 = true; x++;

if ( 5 > 6 ) {

x++;

}

if ( !b1 )

x = x + 10;

else if ( b2 = true ) /* Line 19 */

x = x + 100;

else if ( b1 | b2 ) /* Line 21 */

x = x + 1000;

}

}

System.out.println(x);

}

}

17. Define enum constant in Java.

18. What is the scope of static variable in Java.

19. What would be the output of following code?

import Java.io.*;

class Class1{

Class1(){System.out.println(“Class1:Default Constructor”);}

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 12

Class1(int i){System.out.println(“Class1:Single Parameterized Constructor”);}

}

class Class2 extends Class1{

Class2(){System.out.println(“Class2:Default constructor”);}

Class2(int i){

this();

System.out.println(“Class2:Single Parameterized Constructor”);

}

public static void main(String []args){

Class2 cl = new Class2(2);

}

}

20. What should be the output of following code?

import Java.io.*;

class Class1{

Class1(){System.out.println(“Class1:default constructor”);}

Class1(int i){System.out.println(“Class1:Single parameterized constructor”);}

}

class Class2 extends Class1{

Class2(){System.out.println(“Class2:default constructor”);}

Class2(int i){

super();

System.out.println(“Class2:Single parameterized constructor”);

}

public static void main(String []args){

Class2 cl = new Class2(2);

}

}

21. What should be the output of following code?

import Java.io.*;

class SuperClass{

public void readMessage(){

System.out.println(“SuperClass:You are in Read Message method”);

}

}

class SubClass1 extends SuperClass{

protected void readMessage(){

System.out.println(“SubClass1:You are in Read Message method”);

}

public static void main(String[]args){

SubClass1 cl = new SubClass1();

cl.readMessage();

}

}

22. Is a Java support multiple inheritances? – Justify your answer in brief.

23. Which keyword is used to prevent inheritance?

24. What will happen if the following line is present in program?

abstract final class Demo{

//Line of code

}

25. What happen when you attempt to compile and run following class?

class Test{

Test(int a){

System.out.println(“Test ”+a);

}

}

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 13

class Test_1 extends Test{

Test_1(int a){System.out.println(“Test_1”);}

public static void main(String []a){

Test t = new Test_1(10);

}

}

26. What happen when you attempt to compile and run following class?

abstract class Demo{

abstract void show();

}

class Demo_1 extends Demo{

Demo_1(){System.out.println(“In Demo”);}

public static void main(String [] a){

Demo_1 d = new Demo_1();

}

}

27. What happen when you attempt to compile and run following class?

class Base{

void Base(){System.out.println(“in base”);}

}

Base (int i){

System.out.println(“in base:”+i);

}

30. Define ragged array.

31. What is the default value of integer array’s subscripted variable?

32. What are the first and last elements in int[]arr = new int[24]?

33. What will be the output of following code?

int []arr = new int[]{1,2,3,4,5};

int []arr1=arr;

arr[1]=22;

System.out.println(arr1[1]);

37. Which operator is use to concatenate two String constant?

38. Define regular expression in Java.

39. What is the difference between interface and a class?

40. What is the purpose of abstract class?

41. What happens if a thrown exception is not caught?

42. What is Java Collections Framework?

43. Which collection classes are implemented as linked indexed structure?

Que: 2 Answer the following question in short. [2-3 marks each]

1. Explain the role of JDK.

2. How JVM loads the .class file?

3. How JVM verifies Byte code?

4. Explain how Java achieves portability.

5. How Java is the secure language?

6. How Java is the distributed language?

7. State the difference between primitive data type and reference data type.

8. State the difference between instance variable and class variable.

9. Explain the reusability in the context of method with an appropriate example.

10. State the difference between instance method and class method.

11. Discuss the scope of variable declaration in Java.

12. In Java, what happens when a constructor or any other method assign a value to the reference this?

13. Can we declare variable inside a method as final variable? Justify your answer.

14. What is native method? Explain with example.

15. What is the difference between public and non-public class?

26. Can arrays be initialized at the same time they are defined? If yes, explain it with suitable example.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 14

27. What is the difference between regular array and ragged array?

28. Illustrate with example the declaration of multidimensional array in Java.

29. Explain with an example to pass array to method.

30. Define command line argument with it’s importance in Java programming?

31. Which data structure is introduced by Java to overcome the disadvantages of array. Explain with an

appropriate example.

32. Discuss the usages of valueOf() method in a String class.

33. What is byte based stream?

40. What is Auto-boxing? Explain with appropriate example.

41. What is synchronized collection?

42. What is the primary difference between Set and Map?

43. What happens when you add a primitive type (e.g. double) value to a collection?

45. Explain why a Java program might use the statement

ArrayList<Employee> arr = new ArrayList< Employee >();

46. Explain the use of following notation in a Java program:

public class Array<T>{}

47. Give a key advantages of using catch (Exception e)

48. Give several reasons why exception – handling techniques should not be used for conventional programming

language.

49. What happens when the catch block thrown an exception?

50. What is the key reason for using finally block?

51. Differentiate between String and StringBuffer class.

52. Why is it illegal for a static method to call non-static method?

53. What is the difference between binary stream and text stream?

54. What do you mean by object of String are immutable?

55. What is the difference between abstract class and a concrete class?

56. What is the purpose of an interface?

Que: 3 Answer the following question in details. [6 marks each]

1. Explain the role of JVM.

2. Write a note on JIT compiler.

3. Discuss the parameter passing by value and passing by reference in Java with example.

4. Write a note on access modifier with an appropriate example.

5. What is constructor? List out the type of constructor with an appropriate example.

6. Explain the use of static keyword with an appropriate example.

7. Discuss the type promotion rule in Java.

8. State the difference between this keyword and super keyword with an appropriate example.

9. Write a note on enumeration with an appropriate example.

10. Write a note on accessors and mutators method with its purpose. Also write example code.

11. Explain garbage collection in Java.

12. How we design, create and access package? Discuss with example.

13. Discuss the various levels of access protection for packages and their implementation.

14. Name five standard packages in Java with example.

21. Explain the syntax for defining inheritance, super construct and protected variables with example.

22. What are abstract classes? Explain difference between abstract classes and final classes.

23. Define Dynamic binding and polymorphism with suitable example in Java.

24. Explain the access modifier in Java with suitable example.

25. Identify instances when inheritance is suitable and give example.

26. Can base class access members of a derived class? Give reason.

27. Discuss how Java handles overridden methods with example.

28. What is an abstract class? Can an abstract class have constructor? Explain.

29. Classify the inheritance in Java.

30. Define Dynamic binding with example.

31. Define polymorphism with example.

32. Explain final keyword with its usage.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 15

33. What id multilevel inheritance in Java?

34. Define Array class in Java. List out the method of array class. Explain any three of them with an appropriate

example.

35. Define ArrayList in Java. List out the methods of it. Explain all of them with an appropriate example.

36. Define String class. Explain the overloaded constructor of a class with an appropriate example.

37. List out the various method of string class. Explain any six of them with an appropriate example.

38. Define the StringBilder class with appropriate example.

39. Discuss the difference between String and StringBilder class.

40. Discuss the string tokenizing with appropriate example.

41. Write a Java function to validate whether the inputted email id is valid string or not. (Hint: Use regular

expression, class pattern)

42. Define stream in the context of Java. List out the type of stream supported by appropriate example in Java.

43. Discuss object serialization in Java.

44. How to create sequential – access file using object serialization?

45. How to de-serializing data from a sequence access file?

46. Discuss the List class with all methods with an appropriate example.

47. Discuss the following Collections Methods with an appropriate example.

Sort, binarySearch, reverse, fill, copy, min, max, addAll, frequency, disjoint

48. Discuss the LinkedList class with all methods with an appropriate example.

49. Discuss the Stack class with an appropriate example.

50. Discuss the PriorityQueue class with an appropriate example.

51. Explain following terms with appropriate example.

Set, HashSet, SortedSet, TreeSet

52. Explain each of the following terms:

Collection, Collections, Comparator, List, load factor, collision, HashMap

53. Discuss the Map class with an appropriate example.

54. Discuss the Properties class with an appropriate example.

55. Can you print all the elements in a collection without using an Iterator? If yes, how?

56. How generic methods can be overloaded?

57. List out any five exception that may occur in the Java program with an appropriate example.

Que: 4 Select most appropriate answer from the given option. [1 mark each]

1. Which of the following loads the .class file?

a. JRE

b. JDK

c. JVM

d. JIT

2. Which of the following is virtual machine CPU that simulated by program to run on the actual CPU?

a. JRE

b. JDK

c. JVM

d. JIT

3. Which of the following execute the bytecode?

a. JRE

b. JDK

c. JVM

d. JIT

4. If we are Java application developer then which of the following program must be installed on our operating

system?

a. JDK

b. JRE

c. Eclipse

d. Notepad

5. Which of the following is use to manipulate the data.

b. Class

c. Object

d. Method

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 16

e. constructor

6. If constructor is not defined for the class then which of the following constructor automatically created by Java

compiler?

a. Copy constructor

b. Default constructor

c. Parameterised constructor

d. All of the above.

7. Which of the following package imported by Java compiler into all program?

a. Java.io

b. Java.lang

c. Java.awt

d. Java.util

8. Which of the following class object produce random values?

a. Random

b. random

c. Rand

d. None of the above

9. Which of the following statement is false about object?

A. An instance of a class is an object

B. b. Objects can access both static and instance data

C. Object is the super class of all other classes

D. Objects do not permit encapsulation

10. Which method can access to private attributes of a class?

A. Which methods can access to private attributes of a class?

B. Only instances of the same class

C. Only methods those defined in the same class

D. Only classes available in the same package.

11. What is an aggregate object?

A. An object with only primitive attributes

B. An instance of a class which has only static methods

C. An instance which has other objects

D. None of the above

12. A class can have many methods with the same name as long as the number of parameters or type of

parameters is different. This OOP concept is known as

A. Method Invocating

B. Method Overriding

C. Method Labeling

D. Method Overloading

13. Which of the following is considered as a blue print that defines the variables and methods common to all of

its objects of a specific kind?

A. Object

B. Class

C. Method

D. Real data types

14. Each time a method is invoked, the system stores parameters and local variables in an area of memory, known

as

A. A heap

B. Storage area

C. A stack

D. An array

15. Arguments to methods always appear within

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 17

A. Brackets

B. Parentheses

C. Curly Braces

D. Quotation Mark

16. When you invoke a method with a parameter, the value of the argument is passed to the parameter. This is

referred to as

A. Method invocation

B. Pass by value

C. Pass by reference

D. Pass by name

17. A variable defined inside a method is referred to as

A. A global variable

B. Method variable

C. Block variable

D. Local variable

18. The client can use a method without knowing how it is implemented. The details of the implementation are

encapsulated in the method and hidden from the client who invokes the method. This is known as

a. Information hiding

b. Encapsulation

c. Method hiding

d. Simplifying method

19. Which of the following is considered as individual unit of program by Java compiler?

a. White space

b. Literals

c. Keyword

d. Tokens

20. Which of the following are the characteristic of enum constant?

A. Implicitly final

B. Implicitly static

C. Cannot create an object using new operator

D. All of the above

21. Which of the following is responsible to perform garbage collection?

A. JVM

B. JDK

C. IDE’s

D. None of the above

22. Which of the following is not a graphic character?

a. Digit

b. Symbol

c. Enter

d. Blank space

23. Which of the following is a graphic character?

a. Symbol

b. Enter

c. Backspace

d. Tab

24. Which escape sequence is use to moves cursor to the first column of current line?

a. \\r

b. \cr

c. \r

d. \n

25. Which of the following is Reference data type?

a. String

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 18

b. byte

c. int

d. long

26. The syntax of the argument passed to main() method of any application in Java is:

a. String []args

b. String args[]

c. String args

d. String args[]

27. Which of the following compiler of JVM cached native machine code when the method is first time call?

a. JIT

b. HotSpot Compiler

c. Adaptive optimizer

d. Interpreter

28. In Java which of the following is use for 32- bit Unicode encoding?

a. UTF – 32

b. Unicode -32

c. ASCII

d. UTF – 16

29. Which of the following is considered as individual unit of program by Java compiler?

a. White space

b. Literals

c. Keyword

d. Tokens

30. What should be the output of following statements?

String str = new String(“srimca”);

char c = str.charAt(-1);

System.out.println(c);

a. Print value of c variable

b. Give compile time error

c. Give run time error

d. print blank character.

31. Which of the following is a reserved word in the Java programming language?

a. method

b. double

c. subclasses

d. reference

e. None of the above.

32. Which of the following is a valid comment in Java?

a. /*This is a comment **/

b. /** This is a comment */

c. //Comment

d. All of the above.

33. Among these operators *, ++,=,&&, which operator has highest precedence?

a. *

b. ++

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 19

c. =

d. &&

34. Which of the following is standard output stream?

a. System.out

b. System.in

c. Scanner

d. println()

35. In windows operating system which of the following separator character is use to separate directories and file

path?

a. \

b. /

c. ..

d. Both are valid

Que: 5 True/False Questions [1 mark each]

1. JVM accept to run .class file and .Java file.

2. Java compiler translates source code into bytecode.

3. JIT compiler also known as hotspot compiler.

4. String is the primitive data type.

5. Java class can be private.

6. In Java Public class name must be same as it’s file name.

7. In Java default class name must be same as it’s file name.

8. Getter and setter methods are more appropriate way to access or set the instance variable rather than direct

access.

9. Constructor is the one kind of method.

10. Constructor returns the value.

11. Java class can be a static class.

12. Math.sqrt() method is a class method.

13. main() method can be overloaded.

14. If the method is marked final means it cannot be overloaded by subclass.

15. If the method is marked final means it cannot be override by subclass.

16. In Java constructor can be overloaded.

17. Finalize method is called by garbage collector to perform termination housekeeping on an object just before

the garbage collector reclaim the object’s memory.

18. Default access level methods of the base class can be seen by the subclasses even when the subclass is in

another package.

19. The number of elements in an array x is available as x.size().

20. The number of elements in an ArrayList x is available as x.size().

21. An array declaration reserve memory.

22. In an array subscript can be a long type.

23. An instance of an array is created dynamically using new operator.

24. While executing a program, a value of an array type can be null or a reference to an instance of that array type.

25. String is not an array of character.

26. Array declaration does not reserve any memory.

27. Size of the array must be an integer greater than or equal to zero.

28. An array cannot be indexed backward.

29. If an array is size 10, then array bound is from a[0] to a[9].

30. Collection is use to store the group of object.

31. Regular expression consist of literal character and special symbol.

32. Values of primitive types may be stored directly in a collection.

33. A Set can contain duplicate values.

34. A Map can contain duplicate keys.

35. A LinkedList can contain duplicate values.

36. Collection is an interface.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 20

37. Iterators can remove elements.

38. A PriorityQueue permits null elements.

39. A generic method cannot have the same method name as a nongeneric method.

40. All generic method declaration have a type-parameter section that immediately precedes the method name.

41. A generic method can be overloaded by another generic method with the same method name but different

method parameter.

Unit 5: JDBC & Servlet

Que: 1 Answer the following question in short. [1 mark each]

1. How can you import package in JSP page?

2. How can you access column name from ResultSet?

3. Why Driver-1, i.e., JDBC-ODBC Driver is called ‘Bridge Driver’?

4. Define callable statement.

5. Define scrollable result set.

6. Write a use of executeQuery() method.

7. Write a use of updateRow() method.

8. Which method is use to get the auto-generated key?

9. Define metadata in the context of J2EE.

10. Which is the international standard database language?

11. Which SQL keyword is followed by the selection criteria that specify the rows to select in a query?

12. Which SQL keyword specifies the order in which rows sorted in a query?

13. Define following method: doGet(), doPost(), doXxx(), init()

14. What is the use of destroy() method in servlet?

Que: 2 Answer the following question in short. [2-3 marks each]

1. What is generic servlet?

2. Differentiate between doGet() and doPost() method in HttpServlet.

3. Write a snippet to load JDBC/ODBC bridge and connect to the database.

4. Write a snippet to insert the data into database using JDBC/ODBC bridge.

5. Explain JNDI in brief.

6. Explain connection pool in brief.

7. Write a snippet to update the ResultSet.

8. Write a snippet to delete the row in the ResultSet.

9. Write a snippet to insert the row in the ResultSet.

10. List out the benefits of Java servlets.

11. Write a snippet to display “Hello world” using Httpservlet.

12. How to compile and run the Java servlet?

13. Write a note on deployment descriptor file.

14. Write a snippet to read the data from a client using servlet.

15. Write a snippet to send the data to a client using servlet.

16. What is Http request header?

17. What is Http response header?

18. Write the steps to generate the HTML using servlet.

19. List out the benefits of cookie.

20. List out the benefits of session.

Que: 3 Answer the following question in details. [6 marks each]

1. What is the use of ResultSet in JDBC? Write a JDBC code for view list of records from a table using

parameterized query.

2. Explain different types of Statement in JDBC with their purpose.

3. Define Cookies. How will you handle session using cookies in Servlet? Explain with suitable example code.

4. Explain with example managing user session using session object in Servlet.

5. What is the use of PreparedStatement in JDBC? List out various methods of PreparedStatement and explain

with suitable example.

6. How the transaction is carried out using JDBC API? Explain with example.

7. Explain servlet lifecycle in detail.

8. Write a note on JDBC driver type.

9. Write a note on JDBC process.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 21

10. What is the callable statement? Explain with an appropriate example

11. How to read the result set using J2EE component.

12. List out the most commonly used metadata with brief explanation.

13. Write a code to show the use of ResultSetMetaData class.

14. Define cookie. How to create and get the cookie using Httpservlet? Explain with an appropriate example.

15. Define session. How to set and get the session using Httpservlet? Explain with an appropriate example.

16. How to do deployment of directories?

17. Write a note on role of web middleware.

18. Write a note on basic servlet structure.

Que: 4 True/False Questions [1 mark each]

1. All the JDBC driver are not scrollable.

2. The database transaction consist of the set of SQL statement.

3. A table in the database consist of row and column.

4. Statement objects returns SQL query result as ResultSet object.

5. The primary key uniquely identifies each row in a table.

6. Merging the rows from multiple database tables is called joining.

7. Database is the organized collection of data.

8. Foreign key is a set of columns whose values match the primary-key values of another table.

9. Connection interface helps to manage the connection between Java program and a database.

10. In Java servlet doGet() method is use to interact with a request sent using the METHOD = “GET” from a HTML

form.

11. HttpservletResponse object is used by the Java servlet to send outgoing information to the client.

12. HttpservletRequest object contains incoming information.

Unit 6: JSP and overview of J2EE architecture

Que: 1 Answer the following question in short. [1 mark each]

1. What do you mean by Java beans?

2. Define comment tag in JSP.

3. Define Declaration statement tags in JSP.

4. What is directive tag?

5. What is the use of expression tag in JSP?

6. What is the use of scripting tag in JSP?

7. Define Scriptlets in JSP.

8. Define declaration in JSP.

9. What is a JSP directive?

10. List out the scope attributes values for the useBean.

11. Define sharing request scoped of the beans.

12. Define sharing session scoped of the beans.

13. Define sharing application scoped of the beans.

14. Define unshared page scoped of the beans.

15. Which tag is use to access bean in the initial request?

16. Which tag is use to access bean later?

17. List out the standards of web service.

18. Write the full form of following: WSDL, UDDI, SOAP.

19. What is EJB container?

20. What is an EJB class?

21. What is an EJB interface?

22. What is the functionality of EJB container?

Que: 2 Answer the following question in short. [2-3 marks each]

1. List all JSP scripting element with its purpose.

2. Give use of JSP declaration tag. What is the purpose of jsp:include action?

3. What is J2EE? What is use of Message-driven bean?

4. Write down the advantages of JSP over Java servlet.

5. How to declare variable in object in JSP? Explain with an example.

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 22

6. Write a JSP code to display “Hello world”.

7. How to invoke Java code from JSP? Explain with an example.

8. List out the type of JSP scripting element.

9. List out the predefine JSP variable.

10. Explain jsp:forward tag with an appropriate example.

11. List out the attributes of applet.

12. What are Java beans?

13. What is the use of Java beans?

14. What is Java beans and Java message service?

15. What are client tier and web tier?

16. What is enterprise Java beans tier?

17. What is enterprise information system tier?

18. What is home interface and remote interface?

19. Explain security variable in EJB.

Que: 3 Answer the following question in details. [6 marks each]

1. What are entity beans? How they are differs from session bean?

2. Explain J2EE architecture with diagram.

3. What are implicit objects available to the JSP Page? Explain any two.

4. What do you mean by Enterprise bean? Give advantages of different type of session beans.

5. How do you access Java bean component on JSP page using <jsp:useBean> tag?

6. Explain similarity as well as differences between JSP and servlet. Give situations where, servlet is preferred

over JSP.

7. How to write method and control statements and loop in JSP? Explain with an appropriate example.

8. Define cookie. How to create and get the cookie using JSP? Explain with an appropriate example.

9. Define session. How to set and get the session using JSP> Explain with an appropriate example.

10. Compare the JSP expressions, scriptlets and declaration with an appropriate example.

11. How to access bean properties? Explain with an appropriate example.

12. How to set simple bean properties? Explain with an appropriate example.

13. Write a note J2EE on multi – tier architecture.

14. Write a note on relationship element in EJB.

15. Write a note on EJB transaction element.

16. State the difference between stateless and stateful session bean.

17. Write a note on session Java bean with its type.

18. Write a note on entity bean.

19. What is persistent data? How entity bean manage the persistent data?

20. Write a note on message driven bean.

Que: 5 True/False Questions [1 mark each]

1. Java server pages is the server side program.

2. The session attributes controls whether the page participates in Http sessions or not.

3. The buffer attribute specifies the size of the buffer used by out variable.

4. XML tags are case sensitive.

5. XML tags must be explicitly closed.

6. XML elements names can contain colons.

7. A bean class should have no public instance variable.

8. A beans class must have a zero-argument(default) constructor.

9. A bean class definition should be place in the same directories where servlets can be install.

10. The jsp:useBean action lets you load a bean to be use in JSP page.

11. The tier is an abstract concept that defines the group of technologies that provide one or more services to its

client.

12. A multi-tier architecture consists of clients, resources, component and containers that are use by programmer

to create a distributive system.

13. J2EE consist of four tiers.

14. A request is typically passed from one tier to another before the request is full fill.

15. Two interface are used to interact with EJB are home interface and remote interface.

16. A deployment descriptor describes how EJBs are managed at runtime and enable the customization of EJB

Department of Computer Science & Technology, UTU 2014

Mr. Jitendra V. Nasriwala Page 23

behaviour without modification to the EJB code.

17. Entity beans is use to manage a collection of data retrieved from the database.

18. Data collected and manage by an entity bean is referred as persistent data.

19. An entity bean can have a remoter interface, local interface or both interfaces.

20. A message-driven bean(MDB) is designed for client to invoke the server side business logic using asynchronous

communication.

Que: 3 Select most appropriate answer from the given option. [1 mark each]

1. What is the role played by JSP in the MVC architecture

a. Model

b. View

c. Controller

d. None of the above

2. The original request is handled by

a. JSP

b. Servlet

c. Container

d. All of the above

3. Using which method the servlet can combine its output with that of one or more JSP pages?

a. Include

b. Forward

c. Both (a) and (b)

d. None of the above

4. Which of the following a servlet can do?

a. Invokes business logic

b. Data access code

c. Places the resultant data in beans

d. All of the above

5. If the scoped variable is an object that implements the List interface, the entry name is the

a. Index

b. Value

c. Element

d. None of the above

6. In which interface the entry name is key for implemented scope variable object?

a. Map Interface

b. List Interface

c. Array

d. ArrayList