aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes PreAssessment Questions and Answers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "PreAssessment Questions and Answers" Watch "PreAssessment Questions and Answers" New topic
Author

PreAssessment Questions and Answers

Jaydeep Rege
Greenhorn

Joined: Jun 28, 2001
Posts: 10
Hello All,
Here is a set of pre-assessment questions and my answers to them. Can we please discuss them? I have not captured the exhibits. So those who have not given the test so far may find it from IBM's site.
----------------------------------------


1)
Scheduling project activities such as functional increments and test case development, which one of the following OOAD artifacts is the MOST useful?

a) Use cases

b) Interaction diagrams

c) Activity diagrams

d) Package diagrams

e) Class Diagrams


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- a

2)
Which of the following are effective ways to manage an OO project?

a) Organize the scheduled tasks along the lines of the use cases.

b) Organize the test cases along the lines of the use cases.

c) Organize the user's guide along the lines of the use cases.

d) Organize development teams along the lines of the packages.


Multiple Select - Please select all of the correct answers (this question has 4 correct choices).
Ans-- All

3)
True or false. Ideally, all public methods in business model objects are defined directly or indirectly because of a use case requirement.


a) True

b) False

Single Select - Please select the best answer (one and only one choice must be selected).

Ans- a

4)
If a use case had a requirement "Calculate account balance," which OOAD artifact would be the BEST source for determining the name of the public method used to invoke the operation?


a) Use case

b) Interaction diagram

c) Class diagram

d) Activity diagram


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- b

5)
Which one of the following is the BEST set of potential use cases for the "Prepare for an Event" scenario in Figure ChefScenario?

a) Prepare for party, Display menu, Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list

b) Prepare for party, Display menu, Generate shopping list, Generate utensil list, Pack utensils, Generate to do list

c) Display menu, Generate shopping list, Generate utensil list, Generate to do list

d) Display menu, Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list

e) Generate shopping list, Exclude ingredients on hand, Generate utensil list, Generate to do list, Check utensil list


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- D

6)
Which of the following are true about services resulting from use cases?

a) New requirements in use cases generally result in one or more public methods in a business domain class.

b) Private methods are required by the system's use cases.

c) Use cases drive the design of interaction diagrams, which in turn define public methods in model classes.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans -- a & c

7)
When designing the user interface for an application, if it is unclear what skill level the end user of an application will possess, which of the following is the BEST approach to take?

a) Define the level of skill that will be required by the end user and make the necessary arrangements for educating the users.

b) Define the level of skill that will be required by the end user and provide detailed on-line help that can be accessed by the users when needed.

c) Prototype portions of the user interface and perform some usability tests to identify any problem areas. Document any issues in the product readme and have the users read it before using the product.

d) Prototype portions of the user interface and perform some usability tests to determine the users level of satisfaction. Make any necessary changes and repeat the process.}


Single Select - Please select the best answer (one and only one choice must be selected).

Ans - d

8)
Based on the following statements from a domain expert on a project, which of the following are requirements that MUST be extracted?


a) A note must be sent to the customer for incomplete mortgage applications, listing the missing items.

b) A file must be established for every mortgage application at the time it is submitted, whether the application is complete or not.

c) Addresses on mortgage applications must be entered as all capital letters.

d) A unique mortgage number must be assigned to each mortgage file. This identifier must follow financial industry standard format


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans -- b & d

9)
When creating the use cases related to the "Prepare for an Event" scenario in the Figure ChefScenario, which one of the following BEST represents the type of terminology that the use cases should contain?


a) chef, menu, recipes, ingredients

b) end user, bill of fare, cooking specifications, food contents

c) chef object, menu object, recipe object, ingredient object

d) person record, menu print stream, recipe container, ingredient array


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- a

10)
Which of the following are true about software architecture?

a) Two tier software architectures do not scale to as many clients as three+ tier architectures.

b) Two tier architectures lead to more reuse than three+ tier architectures.

c) Thin clients are restricted to GUI parts

d) Technologies such as CORBA, RMI, DCOM, and Servlets allow multiple clients to work with the same server-based business objects.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans -- c

11)
Referring to the deployment diagram, Figure Deployment, for a system that manages mortgages, which of the following are correct?

a) GUI classes should be in the Branch Client process.

b) These components comprise a three-tier architecture, whether they execute on the same or different computers.

c) For scalability, the business objects should reside in the Financial Apps Server.

d) Client integration is at the Database Server.


Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

Ans-- a,b,c

12)
Which of the following is true about a deployment diagram?

a) Since there is always some kind of response to a message, the dependencies are two-way between deployment components.

b) Dependencies between deployment components tend to be the same as the package dependencies.

c) Deployment diagrams are NOT to be used to show physical modules of code.

d) Deployment diagrams do NOT show physical distribution of a system across computers


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- b

13)
Valid reasons for grouping classes into the same package are that, the classes:

a) are related by aggregation.

b) are worked on by the same group of developers.

c) are related by specialization.

d) support the same high-level services.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans-- b,d

14)
When creating a subclass, the:
a) selected superclass should be chosen because it has some methods the subclass can reuse, even if others do not apply.

b) class name should normally be a qualification of its superclass' name

c) subclass should be of the same type as all of its superclasses

d) superclass should be marked as abstract


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans-- a,c

15)
UML interfaces are used to:

a) define an API for all classes.

b) program in Java, but not in C++ or Smalltalk.

c) define executable logic to reuse across classes.

d) specify required services for types of objects.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans--d

16)
Refer to the Figure Sample 1. Consider the scenario that eStore.com sells small appliances over the Internet. Currently, the store's catalog includes over 50 appliances from 10 different suppliers. A partial class diagram is shown in Figure Sample 1. If there is a new requirement to restock the warehouse automatically as products are sold, how is the new requirement BEST handled?

a) Add "reorderLevel" and "reorderQuantity" attributes used by a new deplete() method in the Inventory class. Use these to generate new orders as InventoryProducts are sold.

b) Add "reorderLevel" and "reorderQuantity" attributes used by a new deplete() method in the InventoryProduct class. Use these to generate new orders as InventoryProducts are sold.

c) Add a deliver() method to the Supplier class that uses the InventoryProduct's amountOnHand attribute to maintain the InventoryProducts in the warehouse.

d) Add "reorderLevel" and "reorderQuantity" to InventoryProduct. Create a Warehouse class that monitors the InventoryProducts' "amountOnHand", generating an order as levels drop below a "reorderQuantity".


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- d
17)
Referring to the partial class diagram in Figure Qualified Association, which of the following BEST describes the relationship?

a) Access to SalesLineItems is by Product. A SalesTransaction can have multiple SalesLineItems for one Product.

b) Access to Products is by SalesLineItem. A SalesTransaction has zero or more SalesLineItems for one Product.

c) SalesTransactions contain Products, which are listed by one or more SalesLineItems.

d) SalesLineItems are for a quantity of one or more Products for a particular SalesTransaction.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans-- b

18)
In design #1, the Catalog object has a getProducts() method, which returns a collection object, such as a Dictionary or array, containing all the Products the company sells. In design #2, the Catalog object has a getProductNumbered(anIdentifier) method, which returns the Product with the specified unique identifier. Considering the objects returned, which of the following BEST characterizes the two designs?

a) Both designs maintain the objects' encapsulation and reduce coupling by accessing state data via methods only and not directly.

b) Both designs break the objects' encapsulation, adding brittle coupling.

c) Design #1 breaks the encapsulation of the Catalog, adding brittle coupling. Design #2 maintains the encapsulation of the Catalog, making future design changes easier.


Single Select - Please select the best answer (one and only one choice must be selected).

ans - a

19)
Based on the following CRC card, what methods should Mortgage have?
a) accrue( anAmountOfInterest )

b) calculateInterest( )

c) apply( aPayment )

d) getCollateral( )

Multiple Select - Please select all of the correct answers (this question has 3 correct choices).
Ans- a,c,d
20)
State diagrams:
a) are good at depicting the behavior of an object across multiple use cases.

b) are best used for objects that have multiple interesting states and not for most or all the objects in the system.

c) are good at depicting interactions among multiple objects.

d) can be used for user interface or control objects.


Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

Ans- a,b,d

21)
Which of the following details are required in OO diagrams?

a) Show navigability of associations in conceptual class diagrams.

b) Show different scenario of a use case on the same interaction diagram for clear understanding.

c) Show message sequence numbers in collaboration diagrams.

d) If asynchronous messages exist in a scenario, show them in interaction diagrams.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans -- c,d

22)
Which of the following is the BEST description of the sequence diagram in Figure Interaction? When an instance of a:

a) Person is asked for its assets, it sums the balances of each of its asset Accounts.

b) Customer is asked for its assets, it sums the balances of each of its asset Accounts.

c) Person is asked for its assets, it returns the balance of its asset Account.

d) Customer is asked for its assets, it returns the balance of its asset Account.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- d

23)
A non-object oriented legacy application which interacts with back end systems exists. It is now required to redesign this application into an object oriented system, that caters to high volume of requests. Which of the following need to be considered while modeling the system?
a) It is not necessary to define classes, such that they represent the data fields in the back end. The object model should capture the behavior of the legacy system.

b) The object model should consist of classes which match the back end data fields. This aids the persistence of classes.

c) Draw activity diagrams to understand the behavior of the existing legacy system.

d) The GUI client objects need to be behavioral driven and they directly communicate with the database.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans- a,c

24)
Which of the following are true about interaction diagrams?
a) Interaction diagrams are at their best when they deal with one main design flow and not multiple variants that can happen.

b) Interaction diagrams are good at designing part or all of one use case's functionality across multiple objects.

c) Interaction diagrams allow the analyst to show iteration and conditional execution for messaging between objects.

d) Sequence diagrams are logically equivalent to collaboration diagrams, differing primarily in format of presentation.


Multiple Select - Please select all of the correct answers (this question has 4 correct choices).

Ans- all

25)
Refer to the state diagram in Figure State for MortgageApplication. Suppose that there is a requirement to add state transitions to a "Cancelled" state from any states except "Closed". Which of the following are valid ways to add the "Cancelled" state?

a) Funnel all cancellations from only one of the other states.

b) Add a "Cancelled" superstate to the diagram.

c) Add transitions from "Submitted" and "Qualified" to a new "Cancelled" state.

d) Add an "Active" superstate that handles the transition to "Cancelled".


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans- b,c
26)
In an OO system, it is desirable to assign responsibilities:

a) relatively evenly across the classes.

b) more heavily in a few controlling classes.

c) according to interaction diagram messaging.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans- a,c

27)
True or false? When declaring a public method due to an additional message between classes as part of some system functionality, the OOAD UML assets should be updated to reflect this change.
a) True

b) False


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- a

28)
Which of the following are true about implementing a system based on existing OOAD assets?
a) Due to constraints introduced by the target language, such as C++, Smalltalk, or Java, as well as physical packaging, the OO analysis model does not carry forward into detailed design and implementation.

b) The classes, methods, attributes, and relationships identified during the OO analysis carry forward into detailed design and implementation.

c) The OO analysis model is usually refactored later in the project.

d) The classes from the OO analysis are expanded to add private methods and collaborations with helper classes.


Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

Ans -b,c,d

29)
Software entropy is a phenomenon wherein programs begin with well designed state, but as new functionalities are added, they lose their structure. Refactoring of classes is done to avoid software entropy. What are good practices to follow during refactoring?

a) Renaming a method and moving a field from one class to another should be done in small steps, testing changes as required.

b) Break down classes that are heavily loaded with responsibilities into smaller classes and distribute the responsibilities among them effectively.

c) Consolidate similar methods from different classes in the same type hierarchy into a common super class wherever possible.

d) Add functionality and refactor simultaneously in order to obtain an efficient and effective design.


Multiple Select - Please select all of the correct answers (this question has 3 correct choices).

Ans- a,b,c

30)
Which of the following are good practices to use while designing for reuse?

a) Define a persistence framework that provides services for persisting objects.

b) Use design patterns, wherein complete solutions are already defined.

c) Use controller objects to control the flow of processes in the system.

d) Assign responsibilities to classes such that coupling between them remains low.

e) Design classes with low cohesion.


Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Ans - b,d

31)
True or false? When declaring a public method due to an additional message between classes as part of some system functionality, the OOAD UML assets should be updated to reflect this change.

a) True

b) False


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- a

32)
An Observer is a design pattern where dependent objects "register" with another "server" object so that they are notified of changes to the server object. The server object isn't specifically aware of its dependents, but only knows to notify them of changes to its state. Which of the following uses an Observer pattern to maintain the correct separation of model and view in a layered software architecture?

a) GUI components register with business components so that they can update their views when the underlying model objects change.

b) GUI components register with other GUI components so that can be notified of user changes to the state of the system.

c) Business components register with GUI components so that the GUI components know who to ask for updates to their state.

d) Business components register with other business components so that they can enforce business rules based on state change.


Single Select - Please select the best answer (one and only one choice must be selected).
Ans- a


33)
A partial class diagram of a college course management application is shown in Figure studentInstructor. A student knows all of the instructors he is registered with. Similarly, an instructor also knows all the students who are registered with him. A new requirement is added which specifies that an instructor can also be a student for some courses. What is the BEST partial application redesign shown in the Figure?

a) Design 'A'

b) Design 'B'

c) Design 'C'

d) Design 'D'

e) Design 'E'


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- d

34)
Referring to the sequence diagram in Figure Interaction, what methods MUST be implemented by the Account class?

a) withdraw, checkBalance

b) withdraw, log, checkBalance

c) withdraw, checkBalance, acknowledge

d) withdraw, acknowledge


Single Select - Please select the best answer (one and only one choice must be selected).

Ans - c

35)
What is the BEST model change for the following new requirements in the mortgage processing system?


a) Add an updateAssessedValue( newValue ) method to the Mortgage class, which uses newValue in collaboration with the Property's tax rates to provide tax amounts.

b) Add an updateAssessedValue( newValue ) method to the Property class, which uses newValue in collaboration with the TaxingAuthority's tax rates to provide tax amounts.

c) Add an updateAssessedValue( newValue ) method to the TaxingAuthority class, which uses its tax rates to provide tax amounts.

d) Add an updateAssessedValue( newValue ) method to the Property class, which uses its tax notes to provide tax amounts.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- b
36)
Which one of the following is a good strategy for resolving class name collisions that occur during OO analysis?
a) Allow each team member to choose a preferred name.

b) Create a class for each domain name, passing on requests to the one class that implements the behavior for all of them to share.

c) Discover better names for different concepts that are referred by the same term.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- b

37)
UML interfaces are used to:

a) define an API for all classes.

b) program in Java, but not in C++ or Smalltalk.

c) define executable logic to reuse across classes.

d) specify required services for types of objects.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- d


38)
Referring to these partial requirements, which of the following is true?
a) The verbs in the requirements become methods in the object model.

b) Some of the verbs in the requirements become methods of the nouns they reference. E.g., a FinancialInstitution class would have a getFinancialInformationFor( aCustomer ) method.

c) Some of the verbs in the requirements become methods of the concept taking the action. E.g., a LoanOfficer class would have a getFinancialInformationFor( aCustomer ) method.

d) Some of the verb phrases in the requirements become overriding methods of the related superclass, due to the specialization of the action.


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- b
39)
A resulting benefit of using polymorphism is reduction of:
a) methods in the associated classes

b) subclasses needed to accomplish the same functionality

c) case statements and conditionals

d) coupling between classes in the system


Single Select - Please select the best answer (one and only one choice must be selected).

Ans- c
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
Jaydeep,
All the pre-assessment questions are discussed before in this forum.Please search for them.If you still have problems, please let us know.
-- Sandeep


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PreAssessment Questions and Answers