Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 CIS 1111 Programming Averaging Quiz Grades (20 Points) Description: In this assignment, you will write a program in C++ that uses files and nested

1 CIS 1111 Programming Averaging Quiz Grades (20 Points) Description: In this assignment, you will write a program in C++ that uses files and nested loops to create a file from the quiz grades entered by the user, then read the grades from the file and calculates the average quiz grade for a class. Each student takes 4 quizzes. Use a nested loop to write each students quizzes to a file. Then read the data from the file in order to display the students average score and the class average. Also write the program in Raptor. Input the data into the Raptor program during runtime. Do not use files for the Raptor program. Enter 5 items for each student. Column 1 is the student ID and Column 2?5 are the quiz grades. Student id Quiz 1 Quiz 2 Quiz 3 Quiz 4 1000 90 100 80 100 1001 85 95 85 100 1002 50 60 70 100 Requirements: 1. Use a nested loop structure to input the data and Write the data to a text file. a. The outer loop will be a while loop; the inner loop will be a for loop (4 quizzes). b. Validate whether the quiz scores are in range (0?100). c. Since you do not know how many students will be entered, add a way to quit the loop. d. Add spaces in between each item added to the text file. Add a new line after each student. The text file that your program creates will look like the following 2. Use a nested loop structure to read the data from the text file and calculate the students average grade. a. The outer look will be a while loop; the inner loop will be a for loop (4 quizzes) b. To calculate each students average score, use a total variable initialized to 0 before the for loop, then calculate the students average after the loop. c. To calculate the class average, initialize a classTotal variable to 0 before the while loop, add each students total into the classTotal following the for loop, then calculate the classAverage after the while loop. d. Only display 2 decimals for the averages. 3. BEWARE of integer division. 4. Use cout to output the values of the variables to the console. Your cout statement MUST use the variables to display the values 5. Output must be labelled and easy to read as shown in the sample output below. 6. Program must be documented with the following: a. // Name 2 b. // Date c. // Program Name d. // Description 7. Write the program in Raptor. Input the data during run time. Sample Output: Submit: Zipped folder named LastNameFirstNameCIS1111NameOfAssignment which contains: 1. Your .cpp file 2. Screen shots of your code and output 3. The Raptor program 4. Screen shots of the Raptor program Grading Guidelines for This Assignment Range Low End (Did not do or did very little effort) Range High End (Used correctly and spent time/effort on programming) Names of variables are meaningful and the program comments self?document the program 0 2 Met all stated requirements 0 10 3 Output is correct given the input, and the output is correctly formatted 0 4 Program compiles and executes without any runtime, syntax, or logic errors 0 3 The zipped project folder that includes the C++ .cpp source files and screens shots of the code and console and raptor program is uploaded to drop box.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books