This chapter completes the basic programming toolkit with brief introductions to methods used in decision making and control features in programming. Such features enable the preparation of programs that, subject to pre-defined conditions, can be used on a wider range of applications. Before beginning this chapter, detach all objects using the detach com-

mand with help from search() and clear the workspace of all objects using the rm command. The first task in preparing the way is to formalize decision-making state-