|
First Summer 2006 |
at the beginning, followed by a minute paper.
After that we will discuss some relevants parts from Chapter 4 in the Alice textbook: methods.
We start by programming in Alice the queen problem.
Instead of the Queen we use Bob.
Instead of the Princess we use a Penguin.
Instead of the Prince we use a Chicken.
A microwave is used in place of the weight.
Just to remind ourselves of their weights we create 3D text and attach it to each character.
Our previous development (see first picture) indicates repetition.
So after much work the program becomes:
But although this is shorter, it can be shortened even further:
The program is now complete, as well.
So here are the individual descriptions of the building blocks.
That was the procedure for bringing the weight down.
Here's how you bring the prince down.
(Notice the assumptions the procedure makes. These are called preconditions.)
There is also a procedure for bringing the Princess down.
And here's the procedure for bringing the queen safely to the ground.
(Implicit assumptions still apply.)
At this point our presentation will be finished.