• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 543
4
Netbeans IDE Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, correct me if I'm wrong, but isn't Abstract Factory just one of the more advanced ways of defining a Factory?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeane for your time. I'm somehow getting correct answers on the mock exams regarding these two.
 
catch it before it slithers away! Oh wait, it's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic