Question: Problem1: Your friend has asked you to help them with a project. Create a C++ program which will accept an unlimited number of grades and

Problem1: Your friend has asked you to help them with a project. Create a C++ program which will accept an unlimited number of grades and calculates the average score for all the grades. 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.

Your code must compile under the g++ compiler.

Your code must execute under Ubuntu 14.00 or greater.

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 gpa for all the grades. The program continues to run until option 4 - quit, is selected.

Figure 1: Example of the main menu for this assignment is below.

Main Menu. 1. Add Grade. 2. Display All Grades. 3. Process All Grades. 4. Quit Program.

IMPORTANT!!!!! You cannot use anything from the standard template library.

Use functions whenever possible to modularize your code. Use function prototypes and code the functions under main().

Style guide elements apply: comments, layout, Program Greeting, Source File Header, and variables etc. etc.

Specification Bundles. These are additional features for your program. Specifications are bundled into groups: "A", "B", and "C". These groups correspond to the highest grade you can get for your code (i.e. completing "C" specifications means I start evaluating your assignment from a C).

THINGS TO NOTE BEFORE STARTING!!!!

ABOUT THE Specification Comments.

*Specifications are bundled into groups: "A", "B", "C", "D". You must meet the specifications of the lowest group before I will count the specifications for the highest group. For example, you must meet the "D" specifications before I will count the "C" specifications!!!! Use whole line comments for Specifications. Put the comment on the line above the start of the code implementing the Specification. If the same Specification code appears in more than 1 place, only com- ment the first place that Specification code appears.

Number your Specifications according to the specification bundle and the specific specification you are using, also provide a very short description.

DO NOT BUNCH ALL YOUR SPECIFICATIONS AT THE TOP OF THE SOURCE FILE.

FOR Example specification comment:

// Specification A2 - Display variables Your code to do this starts here; Its very important to get the specifications down correctly. If your specification code isnt commented, it doesnt count. I use the grep trick to find your specification code. Proper documentation is part of the solution, just like actually coding the solution is.

HERE BELOW IS THE ACTUAL INSTRUCTION!! IT STARTS HERE!!

********************C Specification bundle is below.

1. // Specification C1 - Program Greeting Function Create a void ProgramGreeting function. This function should display (on individual lines) below:

A welcome message. Your name (James Harrison). Today's date. (Format this as MonthName day, year). For example: February 18, 2023.

2. // Specification C2 - Print Scores Print all scores entered to screen when menu selection 2 is chosen.

3. // Specification C3 - Letter Grades Include the letter grades for each individual test score you printed out under Specification C2. Either use a function or method called Grade2Lttr which receives the numeric score and converts it to a letter grade. Return an X if the grade score is too high or too low. Use an if else if ladder for this.

4. // Specification C4 - Compute GPA Compute the average grade for the client and display it when menu selection 3 is chosen.

***********"B" Specification Bundle is below.

1. // Specification B1 - Dynamic Array Create an array on the heap. Store student scores in it.

2. //Specification B2 - Add Elements Start your array at size 0 or 1 (your call) and increase it by one every time you add a new score with menu option 1. Use array pTmp to hold the address of the new memory location and then switch it with the main program data structure - like we did in class.

3. // Specification B3 - Menu Input Validation Only accept numbers in the range of valid inputs (1..4). Reject all other numeric menu input and re-prompt. Dont worry about other potential types of errors. I suggest you put this in a function so you can move it to other homework assignments easily. Use a do while loop to handle this.

4. // Specification B4 - Highlight Failing Grades Create a FancyText class/ which allows you to print a string to the console in a different colored text. The method you pass the string to can either emit a modified string with the ASCII color codes concatenated to it or you can just print to cout in the method. Either way, make failing grades appear in red text and be sure to reset it to normal when you are done.

******************"A" Specification Bundle is below.

1. // Specification A1 - Date class Put all the date code in class Date class. You will want a method to display the date in the proper format: mm/dd/yyyy. Have the object initialize itself by querying the system date.

2. // Specification A2 - External date initialization

Create a method for your Date class called SetDate which al- lows you to change the date for a particular instance. You call the

method and pass in the new date.

3. // Specification A3 - Component Test Method in Date Create a void CompTest 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.

4. // Specification A4 - Unit Test Add a void UnitTest function to your program. You can run A3 here, but also use this to verify your score to letter grade conversion function (C3) is working correctly. Prove each letter works right as well as error checking for too high and too low scores. This runs before your program greeting. It gets turned off for production code, but I want to see it run and confirm the tests are working on your homework. The more tests, the more reliable, but I want to see at least 2.

!!!!PLEASE DO NOT MISS ANY OF THE INSTRUCTION, ONCE THIS IS DONE I WILL RATE EXCEPTIONALLY

&SAMPLE RUN IS BELOW

Problem1: Your friend has asked you to help them with a project.

THANK YOU VERY MUCH!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!