Comments for Assignments

Here is an example of the comments required for every assignment. You will always need an opening comment that will have all the information that is shown in the example. You will always need a variable dictionary explaining what all your variables are used for. You need to explain what various parts of your program are doing. Be sure to use proper indentation (use a tab for each indentation). Do put a box around the opening comment and variable dictionary so they stand out from the rest of your program.

%*********************************************************
%  Name: Your Name                                       *
%  Course: ICS 2O  Pd. 2                                 *
%  Assignment #1                                         *
%  Purpose: One or two sentence purpose of the program.  *
%  Due Date: October 8, 2009                             *
%*********************************************************

%****** Variable Dictionary ******************************
% hours - the number of hours worked                     *
% hourlyWage - how much you get paid per hour            *
% pay - how much you'll get paid                         *
%*********************************************************
var hours : int
var hourlyWage, pay : real
     
% Read input & calculate results
put "How many hours did you work?"
get hours
put "How much do you make an hour?"
get hourlyWage
pay := hours * hourlyWage
      
% Print results
put "For working ", hours, " hours at $", hourlyWage:3:2..
put " you made $", pay:3:2, "."