Question: Terminal Objectives: 1 : Modifying Lab 1 b by adding a Dynamic array to retain the grades of the student. The size of the Array

Terminal Objectives: 1: Modifying Lab1b by adding a Dynamic array to retain the grades of the student. The size of the Array which is the desired number of grades will be prompted at run time from the user. Procedure: 1: Open a new program calling it: Lab1c Add a new source file calling it: Lab1WithDynamicArray Paste into it: Lab1WithFunctionCallByValue 2: Add to the ServiceSelectionUsingIfElse() an array that will be loaded with the student grades. The student grades will be loaded into the array as they are read from the keyboard using the loops functions. In this lab the program will prompt the user for the number of grades to be entered (which is the size of the array) thus a fixed size array cannot be used and a Dynamic array must be used instead. 3: Add to the function DisplayStudentRecord() the code that will also display the individual grades from the array as part of the student record display. Output example shown: Student Record: Student Name: Screw Hammer Grades: 10009585797491685744 Grade Average: 69.3% Letter Grade: D Press to Continue: 4: Test your complete program with various tests inputs that will demonstrate all possible operations including the continuous operation of your program (multi-pass feature) for at least three students. The output should be the display of your banner (with the appropriate entries) and the results of the operations performed for the students, each using a different menu selection. CPSC-3142 C++ Lab1c - Using Dynamic Array Page 2 Rev A Modules Hierarchy: void main()----|||-----void DisplayBanner()||||----- char PromptUserForSelection()||||----- void ServiceSelectionUsingIfElse(char)----|||--float ExecuteWhileLoop(int, int [])||||-- float ExecuteDoWhileLoop(int, int [])||||--float ExecuteForLoop(int, int [])||||--char DetermineLtrGradeUsing | Switch(float)|||-void DisplayStudent Record (float, char, int [], int) CPSC-3142 C++ Lab1c - Using Dynamic Array Page 3 Rev A Program Skeleton void main(){ char MenuSelection; void DisplayBanner(); char PromptUserForSelection(); void ServiceSelectionUsingIfElse(char); } void DisplayBanner(){} char PromptUserForSelection(){ char Selection; -------------- return Selection; } void ServiceSelectionUsingIfElse(char MenuChoice){ int NumberOfGrades; float GradeAverage; char LetterGrade; int *GradesArray; float ExecuteWhileLoop(int, int []); float ExecuteDoWhileLoop(int, int []); float ExecuteForLoop(int, int []); char DetermineLtrGrdUsingSwitch(float); void DisplayStudentRecord(float, char, int[], int); } float ExecuteWhileLoop (int numgrades, int GradesList[]){ int count =1, grade, GradesTotal =0; --------------------------------------- return (float) GradesTotal / numgrades; } float ExecuteDoWhileLoop (int numgrades, int GradesList[]){ int count =1, grade, GradesTotal =0; --------------------------------------- return (float) GradesTotal / numgrades; } CPSC-3142 C++ Lab1c - Using Dynamic Array Page 4 Page 4 Lab12B float ExecuteForLoop(int numgrades, int GradesList[]){ int count =1, grade, GradesTotal =0; ---------------------------------------- return (float) GradesTotal / numgrades; } char DetermineLtrGrdUsingSwitch(float grdavg){ char ltrgrd; ---------------- return ltrgrd; } void DisplayStudentRecord(float avg, char LtrGrd, int GradesList[], int numgrades){ string int } FirstName, LastName; count;

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 Programming Questions!