?Write a program to determine a student\'s grade based on the roster. The course
ID: 3569282 • Letter: #
Question
?Write a program to determine a student's grade based on the roster.
The course has:
4 home works ( 20 points each, equal weightage )
9 labs ( 20 points each, equal weightage )
9 lab attendance points ( 1 point each, equal weightage )
3 exams (100 points each, lowest score has 20%, other two exams have 40%
weightage.)
7 Attendance points from class (Quiz) ( 1 point each, equal weightage )
Extra Credit ( 10 points )
Roster:
Input: hw.txt, lab.txt, labA.txt, exam.txt, quiz.txt
To do:
1. Read the values from the corresponding text files for homework, labs,
attendance and exams. Ask the user to input the score from extra credit
assignment. Section 3.14 in your textbook deals with handling
reading/writing from a file.
2. Calculate percentages for each category.
3. Using the roster, compute the grade. Display the grade.
4. Then tell the user he is missing the higher grade by x% (you compute the x).
If the users score is A+, congratulate him.
5. Then present him with the following analysis:
a. His homework percentage, his lowest homework score.
b. His lab percentage, his lowest lab score and his lab attendance.
c. His Exam percentage, his lowest exams score.
d. Attendance score: In class and Labs
Constraints: Main is a driver function. It should not be used to do any computations.
Create a class called CalcGrade. Define any number of variables/functions as needed.
All the variables need to be private variables. Make the functions do all the
computations.
we were given multiple text files with values of grades in them.
we were also given this code to start the program with and fill in and use.
?Write a program to determine a student's grade based on the roster. The course has: 4 home works ( 20 points each, equal weightage ) 9 labs ( 20 points each, equal weightage ) 9 lab attendance points ( 1 point each, equal weightage ) 3 exams (100 points each, lowest score has 20%, other two exams have 40% weightage.) 7 Attendance points from class (Quiz) ( 1 point each, equal weightage ) Extra Credit ( 10 points ) Roster: Input: hw.txt, lab.txt, labA.txt, exam.txt, quiz.txt To do: 1. Read the values from the corresponding text files for homework, labs, attendance and exams. Ask the user to input the score from extra credit assignment. Section 3.14 in your textbook deals with handling reading/writing from a file. 2. Calculate percentages for each category. 3. Using the roster, compute the grade. Display the grade. 4. Then tell the user he is missing the higher grade by x% (you compute the x). If the users score is A+, congratulate him. 5. Then present him with the following analysis: a. His homework percentage, his lowest homework score. b. His lab percentage, his lowest lab score and his lab attendance. c. His Exam percentage, his lowest exams score. d. Attendance score: In class and Labs Constraints: Main is a driver function. It should not be used to do any computations. Create a class called CalcGrade. Define any number of variables/functions as needed. All the variables need to be private variables. Make the functions do all the computations. we were given multiple text files with values of grades in them. we were also given this code to start the program with and fill in and use.Explanation / Answer
#include<stdio.h>
#include<conio.h>
void main() {
struct student {
char name[30];
char sex;
int rollno;
float percentage;
};
union details {
struct student st;
};
union details set;
printf("Enter details:");
printf(" Enter name : ");
scanf("%s", set.st.name);
printf(" Enter roll no : ");
scanf("%d", &set.st.rollno);
flushall();
printf(" Enter sex : ");
scanf("%c", &set.st.sex);
printf(" Enter percentage :");
scanf("%f", &set.st.percentage);
printf(" The student details are : ");
printf(" ame : %s", set.st.name);
printf(" Rollno : %d", set.st.rollno);
printf(" Sex : %c", set.st.sex);
printf(" Percentage : %f", set.st.percentage);
getch();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.