Here's myt scenario:
A system for a food outlet where the outlet can define their own menus.
The system knows nothing about food. How do I deal with the following in terms of design/applicable pattern:
A menu contains menu items.
Some menu items have options.
Options are complex i.e. a pizza has toppings and the customer can choose say 5 from a list of 7..extra chilli? also, what about diameter and crust type.
Or in the case of a sandwich, the options might be bread type and then fillings..choose 5 from a list of 6 etc. What about butter?
How do i deal with this given that the system won't know what a pizza is i.e. I don't want to create a pizza class since the system is generic i.e. the food outlet defines the menus themselves.
Any help greatly appreciated,
A system for a food outlet where the outlet can define their own menus.
The system knows nothing about food. How do I deal with the following in terms of design/applicable pattern:
A menu contains menu items.
Some menu items have options.
Options are complex i.e. a pizza has toppings and the customer can choose say 5 from a list of 7..extra chilli? also, what about diameter and crust type.
Or in the case of a sandwich, the options might be bread type and then fillings..choose 5 from a list of 6 etc. What about butter?
How do i deal with this given that the system won't know what a pizza is i.e. I don't want to create a pizza class since the system is generic i.e. the food outlet defines the menus themselves.
Any help greatly appreciated,