Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with this please. (Programming in C) Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm
I need help with this please. (Programming in C)
Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm exam, and final exam. Grades are calculated differently for undergrads, grads and distance learners. Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (2 pts). Read from input student status (string), homework points, quiz points, midterm exam score, and final exam score (double). Valid student status includes undergrad (UG), grad (G), and distance leaner (DL). Calculate each category average using maximum points for homework (800), quizzes (400), midterm exam (150), and final exam (200). Output an error message if student status is not one of the three options. Otherwise, output category averages as a percentage using printf ( "Homework: 8.1f ", homework) Submit for grading to confirm two tests pass. Ex: If the input is: UG600.0300.0120.0185.0 The output is: Homework:75.08Quizzes:75.0%Midterm:80.08FinalExam:92.58 Ex: If the input is: TL600300120180 The output is: Error: student status must be UG, G or DL Step 2 (2 pts). Set any average to 100% if average is above 100%. Submit for grading to confirm three tests pass. Ex: If the input is: UG700.0300.0200.0205.0 The output is: Homework: 87.5% Quizzes: 75.0% Midterm: 100.0% Final Exam: 100.0% Step 3 (2 pts). Calculate the course average based on student status using the table below. Output the course average. Submit for grading to confirm five tests pass. Step 4 (4 pts). Identify the course letter grade based on the course average using the table below. Output the course letter grade. Submit for grading to confirm all tests pass. Ex: If the input is: x: If the input is: DL600.0300.0120.0150.0 The output is: Homework: 75.0% Quizzes: 75.0% Midterm: 80.0% Final Exam: 75.0% DL average: 77.08 Course grade: C 44684.2865966.932qy7 \begin{tabular}{l|l} LAB & 3.32.1: LAB : Program: Grade calculator \end{tabular} 0/10 main.c Load default template... 1:Compare output 0/1 Output differs. See highlights below. Input YouroutputstartsEuizerstudentstatus(UG,G,orDL):Enterhomeworkpoints:EnterquizFwithMidterm:80.0%FinalExam:92.5% \begin{tabular}{r|l|} \hline Expected output & Qumework: 75.0\% \\ starts with & Midterm: 75.0.0% \\ & Final Exam: 92.5% \\ \hline \end{tabular} 2:Compare output 0/1 Output differs. See highlights below. Input Your output Enter student status (UG, G, or DL) : Enter homework points: Enter quiz F Expected output Error: student status must be UG, G or DL Output differs. See highlights below. Input DL 900.0300 .0200 .0205 .0 YouroutputstartswithQuizzes:75.08Midterm:133.3%FinalExam:102.5% Homework: 100.0% Expected output Quizzes: 75.0\% starts with Midterm: 100.0% Final Exam: 100.0% 4:Compare output Output differs. See highlights below. Special character legend Homework: 75.0% Expected output Quizzes: 87.5% Midterm: 73.3\% Final Exam: 95.0\% DL average: 85.0\% 0/1 Output differs. See highlights below. Input G 1000.01000 .0100 .0100 .0 \begin{tabular}{r|l} Your output starts & Quizer student status (UG, G, or D D) : Enter homework points: Enter quiz F \\ with & Midterm: 66.7% \\ & Final Exam: 50.0% \end{tabular} Homework: 100.0% Quizzes: 100.0% Midterm: 66.7 Final Exam: 50.0% G average: 65.8% 6:Compare output 0/1 Output differs. See highlights below. Input Enter student status (UG, G, or DL) : Enter homework : Enter quiz F Quizzes: 75.0% Midterm: 80.0% Final Exam: 75.08 Homework: 75.0% Quizzes: 75.0 Midterm: 80.00 7:Compare output 0/1 Output differs. See highlights below. Input Enter student status (UG, G, or DL): Enter homework Enter quiz F Quizzes: 90.0% Midterm: 90.08 Final Exam: 90.0% Homework: 90.08 Quizzes: 90.08 Midterm: 90.0% Final Exam: 90.0% G average: 90.0% Course grade: A 3:Compare output 0/1 Output differs. See highlights below. Input \begin{tabular}{l|l} Enter student status (UG, G, or DL) : Enter homework : Enter quiz 5 \\ Your output & Quizzes: 80.0% \\ & Midterm: 80.0% \\ & Final Exam: 80.0% \end{tabular} Homework: 80.08 Quizzes: 80.0% Midterm: 80.0% 9:Compare output 0/1 Output differs. See highlights below. Special character legend Input UG 475.0240.090.0120.0 Enter student status (UG, G, or DL) : Enter homework : Enter quiz F Quizzes: 60.0\% Midterm: 60.0% Final Exam: 60.0% Homework: 59.4% Quizzes: 60.0% Midterm: 60.0% Final Exam: 60.0\% UG average: 59.9\% Course grade: FStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started