0

web technology Online Quiz - 119

Description: web technology Online Quiz - 119
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

In the UML notation, inside each class in a class diagram are printed

  1. its name, attributes, operations, and derived classes.

  2. its name, attributes and operations.

  3. its name, and attributes.

  4. its name, and operations.

  5. just its name.


Correct Option: B

AI Explanation

To answer this question, we need to understand the UML notation used in class diagrams.

In the UML notation, each class in a class diagram typically includes the following information:

  • Its name
  • Its attributes (also known as properties or fields)
  • Its operations (also known as methods or functions)

Therefore, the correct answer is B) its name, attributes, and operations.

Let's go through each option to understand why it is correct or incorrect:

Option A) its name, attributes, operations, and derived classes - This option is incorrect because class diagrams do not typically include information about derived classes. They only include the name, attributes, and operations of the class itself.

Option B) its name, attributes, and operations - This option is correct because it includes all the necessary information about the class.

Option C) its name and attributes - This option is incorrect because it does not include information about the operations of the class.

Option D) its name and operations - This option is incorrect because it does not include information about the attributes of the class.

Option E) just its name - This option is incorrect because it does not include any information about the attributes or operations of the class.

Therefore, the correct answer is B) its name, attributes, and operations.

Key elements of the use-case diagram are:

  1. people, computers

  2. actors, use-cases

  3. people, classes, and objects

  4. uses, cases

  5. scenarios in point form


Correct Option: B

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

  1. nesting of classes

  2. lines with a solid diamond at one end

  3. lines with a hollow diamond at one end

  4. lines with an arrow at one end

  5. lines without an arrow at either end


Correct Option: C

The file where the task flows and the page flows of the application is specified

  1. Map.xml

  2. Web.xml

  3. ps.xml

  4. DynamicContentAliases.xml


Correct Option: C

Where does the application been first taken in to, when an URL is hit in the browser

  1. Servlet of the appilcation

  2. Deployment descriptor of the appln

  3. Context root of the application

  4. ps.xml file of the application


Correct Option: B

In the UML notation, parameterized (generic) classes are represented by

  1. the normal class representation with a dotted arrow pointing at the template parameter classes

  2. the normal class representation but shaded grey.

  3. the normal class representation with a dotted outline and the names of its parameter classes listed on the top right-hand corner.

  4. the normal class representation with a rectangular box in its top left-hand corner.

  5. Its a trick question - parameterized classes can't be specified in the UML notation.


Correct Option: C
  1. Page Handler

  2. Action Controller

  3. JSP

  4. Javascript


Correct Option: A

Where will the Life Host region of the server be mentioned

  1. ec_debug.jsp->Configuration->DomainData->LifeHost

  2. ec_debug.jsp->DomainData->Host.xml

  3. using wasops

  4. ec_debug->Jars->Registered Components->DomainData->Host


Correct Option: A

Given: public static void before() { Set set = new TreeSet(); set.add("2"); set.add(3); set.add("1"); Iterator it = set.iterator(); while (it.hasNext()) System.out.print(it.next() + " "); } Which statements are true?

  1. The before() method will print 1 2

  2. The before() method will print 1 2 3

  3. The before() method will print three numbers, but the order cannot be determined

  4. The before() method will not compile

  5. The before() method will throw an exception at runtime


Correct Option: E

What is output to the web page on the second access to the same instance of the following JSP? (Choose one.) Chapter 6 Question 2

Chapter 6 Question 2

  1. 0

  2. 1

  3. 2

  4. 3

  5. 4

  6. Page does not translate.


Correct Option: D

Which architecture does PS framework follow

  1. Hibernate Architecture

  2. Struts Architecture

  3. MVC Architecture

  4. Web Architecture


Correct Option: C

In the UML notation, parameterized (generic) classes are represented by

  1. the normal class representation with a dotted arrow pointing at the template parameter classes

  2. the normal class representation but shaded grey.

  3. the normal class representation with a dotted outline and the names of its parameter classes listed on the top right-hand corner.

  4. the normal class representation with a rectangular box in its top left-hand corner.

  5. Its a trick question - parameterized classes can't be specified in the UML notation.


Correct Option: C

XML is Case-Sensitive Language

  1. True

  2. False


Correct Option: B

Given: public static void before() { Set set = new TreeSet(); set.add("2"); set.add(3); set.add("1"); Iterator it = set.iterator(); while (it.hasNext()) System.out.print(it.next() + " "); } Which statements are true?

  1. The before() method will print 1 2

  2. The before() method will print 1 2 3

  3. The before() method will print three numbers, but the order cannot be determined

  4. The before() method will not compile

  5. The before() method will throw an exception at runtime


Correct Option: E

Given: interface Hungry { void munch(E x); } interface Carnivore extends Hungry {} interface Herbivore extends Hungry {} abstract class Plant {} class Grass extends Plant {} abstract class Animal {} class Sheep extends Animal implements Herbivore { public void munch(Sheep x) {} } class Wolf extends Animal implements Carnivore { public void munch(Sheep x) {} } Which of the following changes (taken separately) would allow this code to compile? (Choose all that apply.)

  1. Change the Carnivore interface to interface Carnivore extends Hungry {}

  2. Change the Herbivore interface to interface Herbivore extends Hungry {}

  3. Change the Sheep class to class Sheep extends Animal implements Herbivore { public void munch(Grass x) {} }

  4. Change the Sheep class to class Sheep extends Plant implements Carnivore { public void munch(Wolf x) {} }

  5. Change the Wolf class to class Wolf extends Animal implements Herbivore { public void munch(Grass x) {} }

  6. No changes are necessary


Correct Option: B

Which collection class(es) allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized? (Choose all that apply.)

  1. java.util.HashSet

  2. java.util.LinkedHashSet

  3. java.util.List

  4. java.util.ArrayList

  5. java.util.Vector

  6. java.util.PriorityQueue


Correct Option: D

Given: public static void main(String[] args) { // INSERT DECLARATION HERE for (int i = 0; i <= 10; i++) { List row = new ArrayList(); for (int j = 0; j <= 10; j++) row.add(i * j); table.add(row); } for (List row : table) System.out.println(row); } Which statements could be inserted at // INSERT DECLARATION HERE to allow this code to compile and run? (Choose all that apply.)

  1. List> table = new List>();

  2. List> table = new ArrayList>();

  3. List> table = new ArrayList>();

  4. List table = new List();

  5. List table = new ArrayList();

  6. List table = new ArrayList();


Correct Option: B

Given: 3. import java.util.*; 4. class Business { } 5. class Hotel extends Business { } 6. class Inn extends Hotel { } 7. public class Travel { 8. ArrayList go() { 9. // insert code here 10. } 11. } Which, inserted independently at line 9, will compile? (Choose all that apply.)

  1. return new ArrayList();

  2. return new ArrayList();

  3. return new ArrayList();

  4. return new ArrayList();


Correct Option: B

Which is true? (Choose all that apply.)

  1. "X extends Y" is correct if and only if X is a class and Y is an interface

  2. "X extends Y" is correct if and only if X is an interface and Y is a class

  3. "X extends Y" is correct if X and Y are either both classes or both interfaces

  4. "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces


Correct Option: C
- Hide questions