Amazon VO Interview Coding Question: Pizza Price Calculator

18 Views
No Comments

Write a program that allows the user to calculate the price of a pizza. A pizza has:

  • a base
  • a size
  • toppings

Assume the system stores everything in memory, no storage required.

This Amazon VO question is a small object-oriented design and pricing problem: calculate a pizza’s final price from its base, size, and toppings. A clean solution usually models the pizza components separately and keeps their prices in enums, maps, or configuration tables, then combines them to compute the total. Since everything is stored in memory, there is no need for persistence; the main focus is on clear abstractions and maintainable pricing logic.

END
 0