# BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

# C++代写 | CSCI 1470 Lab 6 Out-of-class Assignment

### C++代写 | CSCI 1470 Lab 6 Out-of-class Assignment

CSCI 1470
Lab 6 Out-of-class Assignment

Topic: Functions (Pass by Value)

Point Value: 20 points.

1. (Save your program as cpp – 20 points) Write a program that will calculate the average score and letter grade earned by a student in any course. The program should allow the user to enter the student’s id number. It should also prompt for the number of exams taken by the student in the course and then calculate the average and letter grade earned.
1. Use main( ) as the driver function. Allow the user to run the program as many times as desired.
2. Write the function getStudentID() that prompts the user for the id (id is represented by an integer value) of the student and returns it back to main().
3. Write the function getNumberExams( ) that prompts the user for the total number of exams taken by the student in the course and returns this value back to main( ). Do not allow the user to enter a value less than one for the number of exams. Display an error message and keep prompting until a valid value is entered.
4. Write the function calculateTotal( ) to determine the total score of the exams take by the student. Use a loop to prompt for each exam score and accumulate the total as the user enter the scores. Return the calculated total back to main( ).
5. Write the function calculateAverage( ) to determine the average grade earned by the student and return this value back to main( ).
6. Write the function determineLetterGrade( ) that determines the letter grade earned by the student for the course and returns this back to main( ).
7. Write the function displayAverageGrade( ) to display the student’s id, the average (to the nearest tenth of a decimal) and letter grade earned by the student.

Sample Input/Output:

Please enter the student’s id:  1234

Please enter the number of exams taken by the student in the course: 3

Enter the exam scores:

Exam 1:  95

Exam 2:  85

Exam 3:  88

Student Id: 1234

Average:  89.3

Would you like to calculate another student’s grade? < y or n > y

Please enter the student’s id:  1806

Please enter the number of exams taken by the student in the course: 2

Enter the exams scores:

Exam 1: ? 91

Exam 2: ? 64

Student Name: 1806

Average:  77.5 