Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock question

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A computer assembler assembles computer with the combination of 1 CPU, one memory size, one hard disk. available types of cpu's are 1GHz,2GHz,3GHz.
available hard disks are 40GB,80GB,100GB. available memory sizes are 1GB,2GB,3GB.
customer has to choose one cpu,memory & hard disk etc.

what pattern is suitable for this?

answer is builder pattern.
why builder why not abstract factory?
 
Pavel Grushetzky
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because person assembles whole from parts - that's what builder for.

Abstract factory is about creating families of related products. It could fit here if, for example, statement had mentioned accessory compatibility issues.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic