No file 'animalData' found: starting from scratch. Is it animal, vegetable or mineral? (animal,vegetable,mineral,save,quit) animal What is it? a horse It's a horse, eh? Now that's settled, let's try again. Is it animal, vegetable or mineral? (animal,vegetable,mineral,save,quit) animal Is it a horse? (yes,no) no What is it then? a cow Give me a 'yes' question for a cow: does it have horns? Ok; let me have another go. Is it animal, vegetable or mineral? (animal,vegetable,mineral,save,quit) animal does it have horns? (yes,no) yes Is it a cow? (yes,no) no What is it then? a goat Give me a 'yes' question for a goat: does it have a beard? Ok; let me have another go. Is it animal, vegetable or mineral? (animal,vegetable,mineral,save,quit) animal does it have horns? (yes,no) no Is it a horse? (yes,no) no What is it then? a rabbit Give me a 'yes' question for a rabbit: does it eat lettuce? Ok; let me have another go.
(a)* Sketch the corresponding animal tree at this point in the game.
(b)* Now suppose we think of a cat, which does not have horns, and does not eat lettuce. Sketch the resulting tree after adding a node for a cat, and a "yes" question of your choice.
(c)* Write down the correct serialised file if the game is now saved. Remember to use the correct indenting and tagging.
All enquiries to Annabelle McIver