The Students studying in BE Final Year. In Final year they have Four Theory Subjects.
List of Subjects and their max and passing marks are as below:
1. EC1 – Max marks 100 . Passing marks 30
2. EC2– Max marks 100 . Passing marks 30
3. EC3– Max marks 100 . Passing marks 30
4. EC4– Max marks 100 . Passing marks 30
5. EC5– Max marks 100 . Passing marks 30
The individual marks are stored in the table like below.
Table Name: Students
StudentID
StudentName
SubjectName
Marks
1
Savita
EC1
50
EC2
55
EC3
28
EC4
30
EC5
35
Problem:
1. You have to write a program to display the list of candidates along with their individual subject marks and total marks like below.
Total
193
Harish
60
210
2. Add logic to your code such that this list of students displayed is in order. The person with maximum total marks is at the top and the person with the least marks is at the bottom.
3. Add a button [Show Results of All]. When clicked, displays the Pass or Fail status for all the students.
Logic is simple: If a student has failed in any subject, he is fail.
Result
Pass
Fail
4. Add a button [Show Results with Grace Marks]. When clicked, display Results with Grace Marks, the program has to add Grace Marks to failed students following a logic. Pass/Fail status has to be displayed for all the students after the Grace Marks are added.
Logic is: Total grace marks per student is max of 6 marks. If the candidate has failed in two subjects with 28 marks in EC1 and 27 marks in EC2, then after grace marks EC1 = 30 and EC2=30. The candidate is declared pass.
If the candidate has secured 25 marks in EC1 and 28 marks in EC2, then the total grace marks needed is 5+2 (7 marks). Hence the student is declared fail and no grace marks are given. Please note that Grace marks can be given to max of 2 subjects only. If Candidate has failed in more than 2 subjects then he is failed and no grace marks are given.
195