| Author |
Identify these patterns...
|
Gurumurthy Ramamurthy
Ranch Hand
Joined: Feb 13, 2003
Posts: 272
|
|
A) Implementing the grammar is easy too. B) simplifies the aggregate interface C) It promotes consistency among products D) Sharing of objects E) Families of related algorithms F) A choice of implementation G) Reduced Name space H) Specifying new objects by varying value I) Provides hooks for subclass Regards, Guru
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Is there a question somewhere in there?
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Don Kiddick
Ranch Hand
Joined: Dec 12, 2002
Posts: 580
|
|
|
and do your own homework ...
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Gurumurthy, I suggest you read GoF book.
|
Groovy
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
E) Families of related algorithms,C) It promotes consistency among products - Abstract factory pattern
|
 |
Ishita Gupta
Greenhorn
Joined: Jan 03, 2003
Posts: 18
|
|
Hi, B) Iterator pattern D) Composite pattern E) Factory method pattern F) Chain of resopnsibility Thanx - SCJP2
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
How is E fatory method pattern. It should be abstarct factory method pattern
|
 |
Ishita Gupta
Greenhorn
Joined: Jan 03, 2003
Posts: 18
|
|
Hi again, Yes u r right Pradeep, E should be Abstract factory pattern. But what about the others i mentioned, are'nt they all correct. In the meanwhile i ll try to figure out what others are. Thanx -SCJP2
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
A is interpreter pattern. Book promotions are nice ways to get home work questions done. How I wish Javaranch was there when I was in college.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
Originally posted by Gurumurthy Ramamurthy: A) Implementing the grammar is easy too.
Grammar sounds a little bit like Interpreter, but I actually don't grok the description...
B) simplifies the aggregate interface C) It promotes consistency among products
I don't understand these.
D) Sharing of objects
Could be Flyweight?
E) Families of related algorithms F) A choice of implementation
Could both be Strategy. Why do you think E is Abstract Factory???
G) Reduced Name space H) Specifying new objects by varying value
Again, I don't even get the question.
I) Provides hooks for subclass
Template Method?
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
The Strategy pattern is very useful for situations where you would like to dynamically swap the algorithms used in an application. Strategy is intended to provide you with a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. Strategy lets the algorithms vary independently from clients that use them.
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
C) It promotes consistency among products
Cant this be abstract factory? I understand consistency as using related products together as a family. I am totally confused.
|
 |
Nambu Lui
Greenhorn
Joined: May 05, 2010
Posts: 5
|
|
A) Implementing the grammar is easy too. - Interpreter
B) simplifies the aggregate interface - Iterator
C) It promotes consistency among products - Abstract Factory
D) Sharing of objects - Flyweight
E) Families of related algorithms -Strategy
F) A choice of implementation - Strategy
G) Reduced Name space - Singleton
H) Specifying new objects by varying value - Prototype
I) Provides hooks for subclass - Factory method
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
|
"Nambu java (Namrata Bibodi)", please check your private messages for a JavaRanch administrative matter.
|
OCUP UML fundamental
ITIL foundation
|
 |
 |
|
|
subject: Identify these patterns...
|
|
|