Software Architecture and Design Fundamentals

Covers UML modeling, Object-Oriented Programming concepts, and Java implementation for enterprise applications including Hibernate ORM and JDBC

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How do you change the value that is encapulsated by a wrapper class after you have instantiated it ?

  1. Use the setXXX() method defined for the wrapper class.
  2. Use the parseXXX() method defined for the wrapper class.
  3. Use the equals() method defined for the wrapper class.
  4. The value encapsulated by a wrapper class is immutable.
Question 2 Multiple Choice (Single Answer)

Which would be most suitable for storing data elements that must not appear in the store more than once, if searching is not a priority?

  1. Collection
  2. List
  3. Set
  4. Map
Question 3 Multiple Choice (Single Answer)

How can you force garbage collection of an object?

  1. Call System.gc()
  2. Garbage collection cannot be forced.
  3. Call System.gc(), passing in a reference to the object to be garbage-collected.
  4. Call Runtime.gc()
Question 4 Multiple Choice (Single Answer)

Which java clas represents SQL statements that are complied before they are executed?

  1. Statement
  2. PreparedStatement
  3. ResultSet.
  4. Callable Statement
Question 5 Multiple Choice (Single Answer)

A Vector is created, and three strings called Tinker, Evers and Chance are added to it. The method removeElement(“Evers”) is called. Which of the following Vector methods retrieve the string “Chance” ?

  1. get(1);
  2. get(2);
  3. get(“Chance”);
  4. None of the above.
Question 6 Multiple Choice (Single Answer)

How do you declare and initialize a String array with two elements in a single line of code?

  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”];
Question 7 Multiple Choice (Single Answer)

What is UML?

  1. Universal Model Locator.
  2. Unified Modeling Locator.
  3. Unified Modeling Language.
  4. Unique Modeling Language.
Question 8 Multiple Choice (Single Answer)

Select the Diagram not part of the UML Implementation?

  1. Class Diagram.
  2. Sequence Diagram.
  3. Bar Chart.
  4. Activity Diagram.
Question 9 Multiple Choice (Single Answer)

When do we need to draw Activity Diagram when developing Use Cases?

  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.
Question 10 Multiple Choice (Single Answer)

When to use Aggregations?

  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.
Question 11 Multiple Choice (Single Answer)

How to define stereotypes in UML?

  1. + checkSum
  2. – checkSum
  3. <<Application>>
  4. Customer1
Question 12 Multiple Choice (Single Answer)

How to define an attribute as Protected inside the Class Diagram (UML)?

  1. + variable1 : String
  2. – variable 1 : String
  3. # variable1 : String
  4. None of the above.
Question 13 Multiple Choice (Single Answer)

If we need to show Concurrent Process in Activity Diagram which node need to be used?

  1. Initial Node
  2. Final Node
  3. Decision and Merge Nodes
  4. Fork and Join Nodes.
Question 14 Multiple Choice (Single Answer)

Suppose subclass B has an “is a” relationship with superclass A – Which relationship should be used?

  1. Association
  2. Composition
  3. Aggregation
  4. Generalization
Question 15 Multiple Choice (Single Answer)

If I want to represent Software and Hardware nodes in an Application – Which UML Diagram should be used?

  1. Deployment Diagram.
  2. State Diagram
  3. Package Diagram
  4. Class Diagram
Question 16 Multiple Choice (Single Answer)

Which of the following is not an Object Oriented implementation?

  1. Inheritance.
  2. Encapsulation.
  3. Overloading.
  4. Yielding.
Question 17 True/False

The term object/relational mapping (ORM) refers to the technique of mapping a data representation from an object model to a relational data model with a SQL-based schema

  1. True
  2. False
Question 18 Multiple Choice (Single Answer)

What’s the root tag in the Hibernate value object mapping XML?

  1. <hibernate-mapping>
  2. <class>
  3. <id>
  4. <property>
Question 19 Multiple Choice (Single Answer)

Select the Element Tag used for pointing the Table name in Hibernate mapping file?

  1. <generator class=”hello”>
  2. <property name=”customerId” column=”CUSTOMER_ID”>
  3. <class name=”book.sample.vo.PurchaseOrderVO” table=”purchase_order”>
  4. <id name=”orderNbr” column=”ORDER_NBR” unsaved-value=”0”>
Question 20 Multiple Choice (Single Answer)

What’s the use of the option “hbm2ddl.auto” in Hibernate Configuration File?

  1. Sets the Necessary Configuration for JDBC Connection
  2. Sets the mapping files for persistent Classes.
  3. Turns on automatic generation of database schemas - directly into the database.
  4. Specify the JDBC Connectivity to happen during startup.