Beruflich Dokumente
Kultur Dokumente
1/5
Student no.:0726860 Documentation CP4012
st
Name: Altafhusain Khan Msc. Computer Science(1 Semister)
ElseIf totMarks is greater than equals to 50 And totMarks is less than
equals to 59 Then
Read “C” into txtGrade.Text
ElseIf totMarks is greater than equals to 40 And totMarks is less than
equals to 49 Then
Read “D” into txtGrade.Text
ElseIf totMarks is greater than equals to 30 And totMarks is less than
equals to 39 Then
Read “E” into txtGrade.Text
ElseIf totMarks is greater than equals to 0 And totMarks is less than
equals to 29 Then
Read “F” into txtGrade.Text
End If
End
Display "Name of student =" & value of stdNm & " with highest
marks =" & value of HigMarks
End If
End
2/5
Student no.:0726860 Documentation CP4012
st
Name: Altafhusain Khan Msc. Computer Science(1 Semister)
If first element of array is not null or not empty then
For m=0 to the last element of an array
If mth,1st element of an array is not null or not empty then
read mth,1st element’s value of an array in to marks
End If
initialise lMarkCount with 0
For i=0 to the last element of an array
If ith,1st element of an array is not null or not empty Then
If ith,1st element’s value of an array is less than equals to marks Then
Add 1 to lMarkCount
End If
End If
Next
If value of lMarkCount equals to 1 Then
read value of marks into lwMarks
read value of mth,0th element’s value of an array in to stdNm
STOP
End If
Next
Display "Name of student =" & value of stdNm & " with lowest marks =" & value of
lwMarks
End If
End
On the click event of “No. of Students gaining Each Grade” command Button
Begin
Declare integers i, m, gradeCount, gA, gB, gC, gD, gE, gF
Declare strings stdNm, grade
If the first element of an array is not Null or Empty Then
For m=0 to the last element of an array
If mth,3rd element of an array is not null or not empty Then
read value of mth,3rd element’s value of an array in to grade
Initialize gradeCount with 0
If value of grade equals to "A" Then
Add 1 to gA
End If
If grade = "B" Then
Add 1 to gB
End If
If value of grade equals to "C" Then
Add 1 to gC
End If
If value of grade equals to "D" Then
Add 1 to gD
End If
If value of grade equals to "E" Then
Add 1 to gE
End If
If value of grade equals to "F" Then
Add 1 to gF
End If
End If
Next
Display "Grade A=" & value of gA & next line & "Grade B=" & value of gB & next
line & "Grade C=" & value of gC & next line & "Grade D=" & value of gD & next
3/5
Student no.:0726860 Documentation CP4012
st
Name: Altafhusain Khan Msc. Computer Science(1 Semister)
line & "Grade E=" & value of gE & next line & "Grade F=" & value of gF & next
line)
End If
End
Tab Index 0
Name
Tab Index 1
Assessment1
Tab Index 2
Assessment2
Tab Index 3
Assessment3
Tab Index 4
Assessment4
Total Marks
Average Marks
Tab Index 11
Grade
Quit
Save Data Tab Index 5
Tab Index 6 Tab Index 7 Tab Index 8 Tab Index 9 Tab Index 10
4/5
Student no.:0726860 Documentation CP4012
st
Name: Altafhusain Khan Msc. Computer Science(1 Semister)
Size of Label controls is = 79 (Width), 13 (Height)
Size of Text Box controls is = 100 (Width), 20 (Height)
Size of Command Button controls = (Width, Height)
Total No. of Students = (75, 37)
Highest Marks = (78, 37)
Lowest Marks = (75, 37)
No. of students gaining each
grade = (111, 37)
Average Marks = (75, 37)
Quit = (75, 37)
Assumptions:
Total Marks 91 58 85
Average Marks 23 14 21
Grades A C A
Evaluation:
5/5