Software Architecture and Design Fundamentals
Covers UML modeling, Object-Oriented Programming concepts, and Java implementation for enterprise applications including Hibernate ORM and JDBC
Questions
How do you change the value that is encapulsated by a wrapper class after you have instantiated it ?
- Use the setXXX() method defined for the wrapper class.
- Use the parseXXX() method defined for the wrapper class.
- Use the equals() method defined for the wrapper class.
- The value encapsulated by a wrapper class is immutable.
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?
- Collection
- List
- Set
- Map
How can you force garbage collection of an object?
- Call System.gc()
- Garbage collection cannot be forced.
- Call System.gc(), passing in a reference to the object to be garbage-collected.
- Call Runtime.gc()
Which java clas represents SQL statements that are complied before they are executed?
- Statement
- PreparedStatement
- ResultSet.
- Callable Statement
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” ?
- get(1);
- get(2);
- get(“Chance”);
- None of the above.
How do you declare and initialize a String array with two elements in a single line of code?
- String [] strArr = [“element 1”, “element 2];
- String [] strArr = {“element 1”, “element 2”};
- String [] strArr = (“element 1”, “element2”);
- String [] strArr = new String [“element 1” , “element 2”];
What is UML?
- Universal Model Locator.
- Unified Modeling Locator.
- Unified Modeling Language.
- Unique Modeling Language.
Select the Diagram not part of the UML Implementation?
- Class Diagram.
- Sequence Diagram.
- Bar Chart.
- Activity Diagram.
When do we need to draw Activity Diagram when developing Use Cases?
- Describe sequence of activities for both conditional and parallel behavior.
- Describe behavior of an object across several use cases
- Used to show behavior of several objects within a use case
- Describe relationships between classes and constraints.
When to use Aggregations?
- To depict elements which are made up of smaller components.
- To define relationship between two elements.
- To define variations on existing UML model.
- Used when we need to map an event with action using a guard.
How to define stereotypes in UML?
- + checkSum
- – checkSum
- <<Application>>
- Customer1
How to define an attribute as Protected inside the Class Diagram (UML)?
- + variable1 : String
- – variable 1 : String
- # variable1 : String
- None of the above.
If we need to show Concurrent Process in Activity Diagram which node need to be used?
- Initial Node
- Final Node
- Decision and Merge Nodes
- Fork and Join Nodes.
Suppose subclass B has an “is a” relationship with superclass A – Which relationship should be used?
- Association
- Composition
- Aggregation
- Generalization
If I want to represent Software and Hardware nodes in an Application – Which UML Diagram should be used?
- Deployment Diagram.
- State Diagram
- Package Diagram
- Class Diagram
Which of the following is not an Object Oriented implementation?
- Inheritance.
- Encapsulation.
- Overloading.
- Yielding.
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
- True
- False
What’s the root tag in the Hibernate value object mapping XML?
- <hibernate-mapping>
- <class>
- <id>
- <property>
Select the Element Tag used for pointing the Table name in Hibernate mapping file?
- <generator class=”hello”>
- <property name=”customerId” column=”CUSTOMER_ID”>
- <class name=”book.sample.vo.PurchaseOrderVO” table=”purchase_order”>
- <id name=”orderNbr” column=”ORDER_NBR” unsaved-value=”0”>
What’s the use of the option “hbm2ddl.auto” in Hibernate Configuration File?
- Sets the Necessary Configuration for JDBC Connection
- Sets the mapping files for persistent Classes.
- Turns on automatic generation of database schemas - directly into the database.
- Specify the JDBC Connectivity to happen during startup.