Question
Task : You want to calculate a student's GPA for a number of classes taken by the student during a single semester. Code should be
Task: You want to calculate a student's GPA for a number of classes taken by the student during a single semester. Code should be in C#.
Inputs: 1. the student's name
2. Class names for the classes taken by the student
3. Class letter grade for the classes taken by the student
4. Class credit hours for the classes taken by the student
Processing: 1. Accept and process classes until the user indicates they are finished
2. accumulate the number of credit hours taken by the student
3. Calculate the total number of "points" earned by the student as:
(a) For each class calculate the points by multiplying the credit hours for that class times the numeric equivalent of the letter grade. ( A=4.0 B=3.0 C=2.0 D=1.0 F=0)
(b) Total all points for all classes
4. Calculate the GPA as the total number of "points" divided by the total credit hours.
Output: Display a nicely worded message that includes the student's name and the GPA (decimal point number with 2 decimal places) achieved by the student that semester.
Step 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