Develop a system/application in Prolog that will allow grader to: load a set of student’s grades (see samples from the Table C below) query student’s final letter grade (A, B, C, etc.) by a given student’s name. query student(s) whose grade matches to the input letter grade (e.g., A). For example, show student(s) whose final letter grade is A. There are 3 types of grades for each student—HWs, Exams, and Project, with a weight of 20%, 40% and 40%, respectively, to the 100-point final. Table A and B show how the final grades (in points and letter) are computed. Table C shows samples of students’ grades. You will define the execution instructions to answer the following questions so that grader can test out your application in Prolog: how to load your source code to Prolog runtime/compiler how to load students’ grades to Prolog runtime/compiler how to query student’s letter grade how to query student(s) whose letter grade matches to an input letter grade Please DO NOT hard code any input values, output values in your code. PLEASE USE ONLY PROLOG AND NOT ANY OTHER PROGRAM Table A: sample final grade computing HW#1 HW#2 HW#3 HW Weight (20%) Mid Term Final Exams Weight (40%) Project Project Weight (40%) Final Point Grade Final Letter Grade 100 100 100 20.00 100 100 40.00 100 40.00 100.00 A 90 90 90 18.00 90 90 36.00 90 36.00 90.00 A 85 85 80 16.67 80 80 32.00 80 32.00 80.67 B+ 90 80 78 16.53 98 76 34.80 92 36.80 88.13 A- 50 50 50 10.00 50 50 20.00 50 20.00 50.00 F Table B: mapping between point grade and letter grade. Letter Grade Point Grade A [ 90 – 100 ) A– [ 85 – 90 ) B+ [ 80 – 85 ) B [ 75 – 80 ) B– [ 70 – 75 ) C+ [ 65 – 70 ) C [ 60 – 65) F [ 1 – 60) [ X : greater than or equal to X Y) : less than Y Table C: sample students’ grades Name HW#1 HW#2 HW#3 Mid Term Final Project John Smith 100 100 100 100 100 100 Marry Lou 90 90 90 90 90 90 Nicole Scott 85 85 80 80 80 80
Develop a system/application in Prolog that will allow grader to:
- load a set of student’s grades (see samples from the Table C below)
- query student’s final letter grade (A, B, C, etc.) by a given student’s name.
- query student(s) whose grade matches to the input letter grade (e.g., A). For example, show student(s) whose final letter grade is A.
There are 3 types of grades for each student—HWs, Exams, and Project, with a weight of 20%, 40% and 40%, respectively, to the 100-point final.
Table A and B show how the final grades (in points and letter) are computed.
Table C shows samples of students’ grades.
You will define the execution instructions to answer the following questions so that grader can test out your application in Prolog:
- how to load your source code to Prolog runtime/compiler
- how to load students’ grades to Prolog runtime/compiler
- how to query student’s letter grade
- how to query student(s) whose letter grade matches to an input letter grade
Please DO NOT hard code any input values, output values in your code.
PLEASE USE ONLY PROLOG AND NOT ANY OTHER PROGRAM
Table A: sample final grade computing
HW#1 |
HW#2 |
HW#3 |
HW Weight (20%) |
Mid Term |
Final |
Exams Weight (40%) |
Project |
Project Weight (40%) |
Final Point Grade |
Final Letter Grade |
100 |
100 |
100 |
20.00 |
100 |
100 |
40.00 |
100 |
40.00 |
100.00 |
A |
90 |
90 |
90 |
18.00 |
90 |
90 |
36.00 |
90 |
36.00 |
90.00 |
A |
85 |
85 |
80 |
16.67 |
80 |
80 |
32.00 |
80 |
32.00 |
80.67 |
B+ |
90 |
80 |
78 |
16.53 |
98 |
76 |
34.80 |
92 |
36.80 |
88.13 |
A- |
50 |
50 |
50 |
10.00 |
50 |
50 |
20.00 |
50 |
20.00 |
50.00 |
F |
Table B: mapping between point grade and letter grade.
Letter Grade |
Point Grade |
A |
[ 90 – 100 ) |
A– |
[ 85 – 90 ) |
B+ |
[ 80 – 85 ) |
B |
[ 75 – 80 ) |
B– |
[ 70 – 75 ) |
C+ |
[ 65 – 70 ) |
C |
[ 60 – 65) |
F |
[ 1 – 60) |
|
Table C: sample students’ grades
Name |
HW#1 |
HW#2 |
HW#3 |
Mid Term |
Final |
Project |
John Smith |
100 |
100 |
100 |
100 |
100 |
100 |
Marry Lou |
90 |
90 |
90 |
90 |
90 |
90 |
Nicole Scott |
85 |
85 |
80 |
80 |
80 |
80 |
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images