The goal of this programming assignment is to give students experience performing numerical calculations and using input/output in C++. Your task is to write a program that will read a series of class grades and calculate the weighted GPA for those classes.
To keep things simple, your program only has to read five(5) class grades from the user, and the corresponding credit hours for each course. For example, the user could type in the following:
To calculate the GPA for these classes, we need to add up the total number of credit hours (15) and the grade points weighted by credit hour (50) and then calculate the GPA = 50/15 = 3.33.
At this early stage in the course, we do not have covered any C++ tools or techniques for error checking. All you need to do is write a program that calculates the correct GPA result if the user follows instructions and types in the grades and credit hours correctly. If the user types in something silly, your program will probably output a silly GPA, and this is OK.
The goal of this assignment is for students to get experience performing numerical calculations and using input/output in C++. You are not required or allowed to look ahead to more advanced C++ features like arrays or loops to perform this task.
For this assignment, the first design task is to decide how to read input data from the user. Do you want to read in the data above in column order as "A B A C A 3 4 4 3 1" or using row order "A 3 B 4 A 4 C 3 A 1". Do you want to read the number of credit hours before or after the class grades? The next task is to decide on how to implement the GPA calculation. What variables and formulas are needed? The final design task is to decide how to present the results to the user. What messages should you print? How should these be formatted? Make sure you write comments in your code to explain your design decisions.
Since you are starting with a "blank piece of paper" to implement this project, it is very important to develop your code incrementally writing comments, adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete.
Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Try your program with several input values, and save your testing output in text files for inclusion in your project report.
When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.
In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "upload" your documentation (a single pdf or txt file), and your C++ program (a single cpp or txt file). Do NOT upload an executable version of your program.
The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit: