Problem

Your friend has asked you to help them with a project. He needs to calculate his grades, but is finding it difficult to operate a calcu- lator. Create a program which will accept an unlimited number of grades and calculates the average score. Assume each test is worth 100 points. Suggested letter grades scale of 90+ 'A, 80+ B, 70+ C, 60+ D , less than 60 are F.

Requirements

  • Do not optimize for computer performance.
  • Global variables in any form are forbidden. This includes #define statement's, too. You can, and should, put classes and structs right under your include statements and using namespace std; statement.
  • Put a Source File Header at the top of your source file.
  • Include a void ProgramGreeting() function. This will run auto- matically once when the program first starts. This function should display (on individual lines):
    • A welcome message.
    • Your name (as author).
    • The date this assignment is due. Format this as MonthName day, year. Example: June 30, 1988.
  • Do not your c (.h) style libraries. Use c++ libraries instead.
  • You cannot use any data structures from the standard template library. No < vectors > or < arrays > or anything like that. You can use C-Style arrays, however. You can also build your own dynamic memory structures.

Specifications

// Specification C1 - Menu Driven Program

Create a numeric menu driven program. Figure 1 is an example of what this menu would look like. Add grade adds a student grade. Display all grades dumps all the scores to the console. Process all grades calculates the overall gpa for all the grades. The program continues to run until option 4 - quit, is selected.

// Specification C2 - Print Scores

Print all scores entered to screen when menu selection 2 is chosen.

// Specification C3 - Letter Grades

Include the letter grades for each individual test score you printed out under Specification C2.

// Specification C4 - Compute GPA

Compute the GPA (0-100%) for the client and display it when menu selection 3 is chosen.

// Specification B1 - Dynamic Array

Create an array on the heap. Store student scores in it.

// Specification B2 - Add Elements

Start your array at element 0 and increase it by one every time you add a new score with menu option 1.

// Specification B3 - Menu Input Validation

Only accept numbers in the range of valid inputs (1..4). Reject all other menu input and re-prompt.

// Specification B4 - Print Letter Grade

Print the letter grade for the overall gpa right next to the raw score when menu selection 3 is chosen. If it matters, assume a 4.0 scale.

// Specification A1 - Date class

Put all the date code in class Date class.

// Specification A2 - External date initialization

Set the data for your Date class externally, either through a setter method or a constructor.

// Specification A3 - Component Test Method in Date

Create a method in the date class which performs self diagnostics. That is, it instantiates a date object with known data and then compares the results with expected, correct, answers. Use this to demonstrate your input routines are working. Prove month, day, and year are indeed set correctly by A2 and the resulting output is formatted as expected.

// Specification A4 - Component Test Grade Conversion

Add a void UnitTest() function to your program. You can run A3 here, but also use this to verify your score to letter grade con- version function is working correctly. Prove each letter works right as well as error checking for too high and too low scores. Note: This implies your letter grade code is in a function.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.