• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

5 simple test questions.

 
Stephen Lim
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I have tried these 5 test questions. But, I'm unsure whether my answers are correct. Anyone, please care to try?
Q1 .Which pattern would you use to create a complex object and have the assembly and parts independent

A. Prototype

B. Singleton

C. Builder

D. Abstract Factory

Q2 What is a main benefit of the facade pattern

A. It hides complex sub systems from clients

B. It prevents weak coupling

C. It allows objects to masquerade as different objects

D. It decouples the object from its implementation

Q3. Double checked locking is NOT a problem when

A. The singleton pattern is used

B. we run on multiprocessor implmentations of the JVM

C. synchronisation of accessors is eliminated

D. run in single threaded environments

Q4. Horizontal scalability is

A. achieved with more machines

B. achieved with higher capacity machines

C. achieved with higher capacity dataservers

D. achieved with decoupled distributed objects

Q5. Which statement on passivation is true

A. Containers must set the transient values to null or zero

B. Containers must use java technology serialisation to passivate a bean instance

C. Container calls ejbPassivate to save the entity bean instance's state to the database

D. Container can use any serialisation technique to passivate a bean instance as long as it follows Java technology serialisation rules.

After, you're done, can anyone tell me where can I obtain such questions? Is this possibly from a SCEA exams or some where else? [I honestly dunno as this was taken from a eval site with no copyrights and credits]
 
sam joe
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.c
The client creates the Director object and configures it with the desired Builder object.
Director notifies the builder whenever a part of the product should be built.
Builder handles requests from the director and adds parts to the product.
The client retrieves the product from the builder.
2.ab
It shields clients from subsystem components, thereby reducing the number of objects that clients deal with and making the subsystem easier to use.
It promotes weak coupling between the subsystem and its clients. Often the components in a subsystem are strongly coupled. Weak coupling lets you vary the components of the subsystem without affecting its clients. Facades help layer a system and the dependencies between objects. They can eliminate complex or circular dependencies. This can be an important consequence when the client and the subsystem are implemented independently.
Reducing compilation dependencies is vital in large software systems. You want to save time by minimizing recompilation when subsystem classes change. Reducing compilation dependencies with facades can limit the recompilation needed for a small change in an important subsystem. A facade can also simplify porting systems to other platforms, because it's less likely that building one subsystem requires building all others.
3.d
check http://www-106.ibm.com/developerworks/java/library/j-dcl.html?dwzone=java
4.bc
Increase capacity means to add more memory, CPU, etc.
5.d
Vendor can implement any serialisation techniques to passivate a bean.

Some questions are from whizlab or Cade book.
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ August 02, 2003: Message edited by: Manjunath Subramanian ]
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO question 4 is correctly answered with D.
The SCEA links page identifies a bunch of mock exams.
 
sam joe
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rufus is right, didn't pay attention to 'horizonal'. I though it was 'Vertical'.
 
Leo Liao
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Q4, why answer A is incorrect?
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only because D is a better answer. To do A, D has to be done first.
 
Haroldo Nascimento
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have 3 doubts :
1- Session Bean prove fine granted to data acess object ?
Yes or not ?
2- What are the services the EJB ? (choice 2)
a) Html generation
b) Transaction services
c) lifecycle managemant
d) remote-methd invocator
3-IIOP are (choice 2):
a) security
b) conectless
c) connection based
d) used for remote connection
After, you're done, can anyone tell me where can I obtain such questions? Is this possibly from a SCEA exams or some where else? [I honestly dunno as this was taken from a eval site with no copyrights and credits][/QB]
 
noel angel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi stephen,
Question #5 is from Cade/Roberts book page 28. The answer is D.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic