Chapter 2. Define Types

Table of Contents

Pizzas
Orders

TODO: ...

Pizzas

TODO: ...

pizza ako object with
	crust: range [thin, thick, cheezy ]
	
	size: range [regular, large, family]
	
	type: range [ custom, meat, hawaiian, vegetarian, BBQchicken ]
		if_needed custom
	
	toppings: multivalued true
		range [ onion, pineapple, ham , peperoni, salami, beef, capsicum,
			chicken, olives, mushroom]
		if_needed []
	
	quantity: if_needed 1
	
	description:
		if_needed
			if (type == custom) then
				if (toppings == []) then
					<< ^size ^crust crust >>
				else
					<< ^size ^list_list(toppings) on ^crust crust >>
			else
				if (toppings == []) then
					<< ^size ^type on ^crust crust >>
				else
					<< ^size ^type on ^crust crust with ^list_list(toppings) >>
;;