Tag: architecture

Questions Related to architecture

  1. get(1);

  2. get(2);

  3. get(“Chance”);

  4. None of the above.


Correct Option: A
Explanation:

To solve this question, the user needs to know about Vector methods and how they work.

When a string is added to a Vector, it is assigned an index based on the order in which it was added. In this case, "Tinker" would be assigned an index of 0, "Evers" would be assigned an index of 1, and "Chance" would be assigned an index of 2.

The method removeElement("Evers") will remove the string "Evers" from the Vector and shift the index of "Chance" down by one, so it will now have an index of 1.

Now let's go through each option and explain why it is right or wrong:

A. get(1): This option will retrieve the string at index 1 of the Vector, which is now "Chance". This option is correct.

B. get(2): This option will retrieve the string at index 2 of the Vector, which is now out of bounds since the vector size is now 2. This option is incorrect.

C. get("Chance"): This option is not a valid method for retrieving elements from a Vector. This option is incorrect.

D. None of the above: This option is incorrect because option A is correct.

Therefore, the answer is: A. get(1);

  1. String [] strArr = [“element 1”, “element 2];

  2. String [] strArr = {“element 1”, “element 2”};

  3. String [] strArr = (“element 1”, “element2”);

  4. String [] strArr = new String [“element 1” , “element 2”];


Correct Option: B
  1. Universal Model Locator.

  2. Unified Modeling Locator.

  3. Unified Modeling Language.

  4. Unique Modeling Language.


Correct Option: C
  1. Class Diagram.

  2. Sequence Diagram.

  3. Bar Chart.

  4. Activity Diagram.


Correct Option: C
  1. Describe sequence of activities for both conditional and parallel behavior.

  2. Describe behavior of an object across several use cases

  3. Used to show behavior of several objects within a use case

  4. Describe relationships between classes and constraints.


Correct Option: A
  1. To depict elements which are made up of smaller components.

  2. To define relationship between two elements.

  3. To define variations on existing UML model.

  4. Used when we need to map an event with action using a guard.


Correct Option: A
    • checkSum
  1. – checkSum

  2. <>

  3. Customer1


Correct Option: C
    • variable1 : String
  1. – variable 1 : String

  2. variable1 : String

  3. None of the above.


Correct Option: C
  1. Initial Node

  2. Final Node

  3. Decision and Merge Nodes

  4. Fork and Join Nodes.


Correct Option: D