program grades (input,output); const MAX = 1; procedure introduction; begin end; procedure initialize (var sectionOne : char; var size : integer); begin sectionOne := ' '; size := 0; end; function letterToGPA (letter : char) : integer; begin letterToGPA := 4; end; function findMin (sectionOne : char; size : integer) : char; begin findMin := 'F'; end; function findMax (sectionOne : char; size : integer) : char; begin findMax := 'A'; end; procedure enterGrades (var sectionOne : char; var size : integer); begin writeln('Student #', (size+1), ' MAX STUDENTS=', MAX); write('Type in the letter grade and hit return: '); readln(sectionOne); (* Check if the letter grade was valid. *) size := size + 1; end; procedure display (sectionOne : char; size : integer; mean : real; mode : char); begin writeln('GRADES FOR THE LECTURE (letter, gpa)'); writeln('------------------------------------'); if (size = 0) then begin writeln('There are no students registered in this lecture section.'); end (* Display all the grades. *) else begin writeln(' Student #:':12, size:3, ': ', sectionOne, ', '); (* Map the letter grade to a numerical GPA *) end; (* Display the statistical informaton *) (* Calculate and display the mean *) (* Determine the mode and display onscreen. *) (* Find the min and max grade and display onscreen. *) end; function findMean (sectionOne : char; size : integer) : real; begin (* JT: Hint don't try to find the average of the letter values but use the * corresponding grade points instead. *) findmean := 4.0; end; function equalDistribution : boolean; begin equalDistribution := true; end; function mostFrequentGrade : char; begin mostFrequentGrade := 'A';; end; function findMode (sectionOne : char; size : integer) : char; begin findMode := mostFrequentGrade; end; begin var sectionOne : char; var size : integer; var mean : real; var mode : char; introduction; initialize(sectionOne,size); enterGrades(sectionOne,size); mean := findMean (sectionOne,size); mode := findMode (sectionOne,size); display(sectionOne,size,mean,mode); end.