Phase 2: Training to Recognize Roles

There are 6 programs which will be presented to you so that you can train to reognize roles. Each program will be shown in a separate web page. For each variable, select the role that you think describes it most appropriately. The links beside the selections will enable you to review the definitions and examples of roles at any time.

When you have finished, click on Done; you will receive feedback comparing your choice of roles to ours.

Example Program 1

program squares (input, output);

(* Print two squares *)

var distance : integer; (* Distance between squares *)
begin
    write('Enter the distance between squares: '); readln(distance);
    writeln;
    writeln('***', ' ' : distance, '***');
    writeln('* *', ' ' : distance, '* *');
    writeln('***', ' ' : distance, '***')
end.

Determine appropriate role for each of the variables:
distance  
fixed value
stepper
most-recent holder
most-wanted holder
gatherer
transformation
follower



Last updated: October 22, 2002

Jorma.Sajaniemi@Joensuu.Fi