Please be as quick as you can and write in c++

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Please be as quick as you can and write in c++
### C++ Programming Assignment: Student Grade Processing

#### Task Description:
Create a complete C++ program that performs the following operations:

1. **Input and Validation:**
   - Prompt the user to enter the number of students and store this value in a variable named `numStudents`.
   - Ensure that the input is validated so that neither zero nor any negative number is accepted.

2. **Processing Each Student:**
   - For each student:
     a. **Input Data:**
        - Read the student's name, midterm exam grade (integer), final exam grade (integer), and the curve (integer).
        - Validate each of these numeric inputs to ensure that neither zero nor any negative number is accepted.
     b. **Calculate Average:**
        - Utilize a function named `calcAverage` that takes the midterm exam and final exam grades as parameters.
        - The function should return the calculated average as a decimal number.
     c. **Display Result:**
        - Use a function named `printStudent` that takes the student's name, the average returned by `calcAverage`, and the curve as parameters.
        - This function should print the student's name and display one of the following messages:
          - “COURSE PASSED” if the sum of the average and the curve is greater than or equal to 60.
          - “COURSE FAILED” if the sum of the average and the curve is below 60.

### Detailed Steps of Implementation:

1. **Prompt User for Number of Students:**
   - Create a variable `numStudents`.
   - Prompt and read the number of students from the user.
   - Validate the input to ensure it is a positive integer.

2. **Loop Through Each Student:**
   - For each student, read the required data (name, midterm grade, final exam grade, curve).
   - Validate each numeric input, ensuring it is a positive integer.
   
3. **Calculate Average:**
   - Implement the function `calcAverage` which:
     - Accepts midterm and final exam scores as arguments.
     - Calculates the average of these scores.
     - Returns the average as a decimal number.

4. **Print Student Results:**
   - Implement the function `printStudent` which:
     - Accepts the student's name, calculated average, and curve as arguments.
     - Calculates the total score by adding the average and curve.
     - Prints the student's name and either “COURSE PAS
Transcribed Image Text:### C++ Programming Assignment: Student Grade Processing #### Task Description: Create a complete C++ program that performs the following operations: 1. **Input and Validation:** - Prompt the user to enter the number of students and store this value in a variable named `numStudents`. - Ensure that the input is validated so that neither zero nor any negative number is accepted. 2. **Processing Each Student:** - For each student: a. **Input Data:** - Read the student's name, midterm exam grade (integer), final exam grade (integer), and the curve (integer). - Validate each of these numeric inputs to ensure that neither zero nor any negative number is accepted. b. **Calculate Average:** - Utilize a function named `calcAverage` that takes the midterm exam and final exam grades as parameters. - The function should return the calculated average as a decimal number. c. **Display Result:** - Use a function named `printStudent` that takes the student's name, the average returned by `calcAverage`, and the curve as parameters. - This function should print the student's name and display one of the following messages: - “COURSE PASSED” if the sum of the average and the curve is greater than or equal to 60. - “COURSE FAILED” if the sum of the average and the curve is below 60. ### Detailed Steps of Implementation: 1. **Prompt User for Number of Students:** - Create a variable `numStudents`. - Prompt and read the number of students from the user. - Validate the input to ensure it is a positive integer. 2. **Loop Through Each Student:** - For each student, read the required data (name, midterm grade, final exam grade, curve). - Validate each numeric input, ensuring it is a positive integer. 3. **Calculate Average:** - Implement the function `calcAverage` which: - Accepts midterm and final exam scores as arguments. - Calculates the average of these scores. - Returns the average as a decimal number. 4. **Print Student Results:** - Implement the function `printStudent` which: - Accepts the student's name, calculated average, and curve as arguments. - Calculates the total score by adding the average and curve. - Prints the student's name and either “COURSE PAS
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY