%-------------------------------------------------------------------- % csc 148s, 1996, Assignment 1: Calculating grade-point averages % name: >> Your name here << % student number: >> Your student number here << % lecturer: >> Your lecturer's name here << % lecture time: >> Your lecture time here << % tutor: >> Your tutor's name here << %-------------------------------------------------------------------- >> Insert comments here to describe the program. << % Converstion tables % ------------------------------------------------------------------- % The tables of conversion between percentages, letters and grade % points. >> Declare conversion tables here (as constant arrays). << % function GradePoints % -------------------------------------------------------------------- % Given a percentage, return the corresponding grade points. function GradePoints (percent : int) : real >> Insert body of function here. << end GradePoints % function Letter % ------------------------------------------------------------------- % Given a grade-point value, return the corresponding letter grade. function Letter (gp : real) : string(2) >> Insert body of function here. << end Letter % Main Program % ------------------------------------------------------------------- >> Insert variable declarations here << % For each student, read their data and process it. Stop when we get % a student number of 000000000. loop % Read the data for the next student get studentNo exit when studentNo = 0 get studentName, oldTotalCourses, oldGPA, nCourses >> Insert the main body of the program here << % Output the results put studentNo, " ", studentName :20, " ", newTotalCourses :3, termGPA :6:2, " ", termGPAletter :2, newGPA :6:2, " ", newGPAletter :2 end loop