Multiple choice technology programming languages

Compact Computers is a small computer assembly company. Their online application allows customers to pick and choose accessories to build their own PCs. The accessories are: i. Processor - 800Mhz, 1Ghz, 1.2Ghz ii. HDD - 40 GB, 60 GB, 80 GB iii. Memory - 128 MB, 256 MB, 512 MB If a computer can have exactly 1 processor, 1 HDD and 1 memory stick, what pattern would be best used here?

  1. Factory Method

  2. Builder

  3. Abstract Factory

  4. Singleton

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Builder pattern separates construction from representation, letting you create complex objects step by step. For PC assembly, you'd use a Builder to select processor, HDD, and memory sequentially before building the final product. Factory Method creates entire objects at once, while Abstract Factory creates families of related products.