File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Statements that *maybe* apply to both Abstract Factory or Factory but they don't Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Statements that *maybe* apply to both Abstract Factory or Factory but they don Watch "Statements that *maybe* apply to both Abstract Factory or Factory but they don New topic
Author

Statements that *maybe* apply to both Abstract Factory or Factory but they don't

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
Ok, so here are some generic statements from the SCEA 5 study guide... which I think apply to both Abstract Factory and Factory.

(1) Eliminates the need to bind application classes to your code. Code deals only with the interface.
- is one of the benefits of Factory but I think it's also applicable to Abstract Factory - True or False?

(2) Provides an abstract class that determines the appropriate concrete class to instantiate to create a set of concrete products that implement a standard interface.
- is Abstract Factory but I think it's also a description for Factory - True or False?

(3) A class wants its subclasses to specify the objects it creates.
- is one of the usages for Factory but I think it's also applicable to Abstract Factory - True or False?

(4) A class cannot anticipate the class of objects it must create.
- is also one of the usages for Factory but I think it's also applicable to Abstract Factory - True or False?

(5) Enables the subclasses to provide an extended version of an object.. because creating an object in a class is more flexible than creating directly in the client.
- is one of the benefits of Factory but I think it's also applicable to Abstract Factory - True or False?

(6) Classes delegate responsibility to one of several helper subclasses and you want to localize the knowledge of which helper subclass is the delegate.
- is one of the usages for Factory but I think it's also applicable to Abstract Factory - True or False?

(7) The system should be independent of how its products are created, composed and represented.
- is one of the usages for Abstract Factory, but I think it's also applicable to Factory - True or False?

What do you guys think?


SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...
Dieter Quickfend
Bartender

Joined: Aug 06, 2010
Posts: 510
    
    4

Well, correct me if I'm wrong, but isn't Abstract Factory just one of the more advanced ways of defining a Factory?


Oracle Certified Professional: Java SE 6 Programmer && Oracle Certified Expert: (JEE 6 Web Component Developer && JEE 6 EJB Developer)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Dieter Quickfend wrote:Well, correct me if I'm wrong, but isn't Abstract Factory just one of the more advanced ways of defining a Factory?

Kind of. The abstract factory pattern is a specific pattern. Whereas Factory is used in many ways. It could be a pattern on its own. Or it could be the factory method pattern or the abstract factory pattern.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Denise,
I don't have my copy of the book handy, but benefits repeat across patterns.

1) AbstractFactory definitely deals with interfaces as well
2) It depends. Factory can mean many things.
3) AbstractFactory definitely deals with subclasses.
4, 5, 6) Yes (i got lazy in typing out sentences)
7) Maybe. It depends on what you mean by the system.
Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
Thanks Jeane for your time. I'm somehow getting correct answers on the mock exams regarding these two.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Statements that *maybe* apply to both Abstract Factory or Factory but they don't
 
Similar Threads
Builder Pattern Question
Why we can't create object to ABSTRACT & INTERFACE classes?
EJB Home uses Abstract factory or Factory Method?
Confusion regarding which pattern!
difference between factory pattern , abstract factory pattern and command pattern