Submitted by: Submitted by papaotres
Views: 10
Words: 262
Pages: 2
Category: Science and Technology
Date Submitted: 10/10/2015 07:21 PM
CMIS 102 6387 Introduction to Problem Solving and Algorithm Design (2158)
Due: 20 Sep 2015
Program Description - This program will allow a user to input their name and final grades from their courses and calculate their GPA accordingly. The amount of students, as well as the amount of classes each student is taking, are undetermined.
Analysis – First I need to declare A, B, C, D, F and GPA as integers.
A = 4, B = 3, C = 2, D = 1, F = 0.
Each of these numbers will be floated
The program will ask for the name of the user
User Name: Stephen
The program will then ask for the grades.
Grades Entered: A,A,D
The letters corresponding to the integers will be summed
ex. A+A+D = 4+4+1 = 9
The program will then divide the sum of the integers by the amount entered.
9/3 = 3.0 = GPA
The program will print the students name and their GPA
Name: Stephen GPA = 3.0
|Test Case # |Input |Expected Output |
|1 |James: A, A, D, B |3 |
| |Chris: B, B, D, C |2.25 |
| |David: C, A, A, B |3.25 |
| |Kelsey: B, B, A, C |3 |
| |Marissa: C, C, A, B |2.75 |
Pseudocode-
//Purpose: This program will allow students to input their name and grades to determine a GPA value...