Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ lang. Quiz.dat TFTFTFTFTTTFFFT TFTFTFTFTTTFFFTJoe Jones TFTFTFTFTTTFFFFJanet Jerome TFTTTFTTTTTFFFTBetty Blaire TTTFTFTFTTTFFFFBob Blaine TFTFTTTTTTTFFFTRobby Roberts FTTFTFTFTTTFFFTRobin Rogers TFTFTFTFTTTFTTTCarla Cross TFTFTTTTTTTFFFTCarl Cream TTTTTTTTTTTTTTTNell North FFFFFFFFFFFFFFFNed Nest TFTFTFTFTFTFTFTDarla

image text in transcribedC++ lang. Quiz.dat TFTFTFTFTTTFFFT TFTFTFTFTTTFFFTJoe Jones TFTFTFTFTTTFFFFJanet Jerome TFTTTFTTTTTFFFTBetty Blaire TTTFTFTFTTTFFFFBob Blaine TFTFTTTTTTTFFFTRobby Roberts FTTFTFTFTTTFFFTRobin Rogers TFTFTFTFTTTFTTTCarla Cross TFTFTTTTTTTFFFTCarl Cream TTTTTTTTTTTTTTTNell North FFFFFFFFFFFFFFFNed Nest TFTFTFTFTFTFTFTDarla Darn FTFTFTFTFTFTFTFDean Darling

Exercise 1: Write a program to grade a set of true/false tests. There are 15 true/false questions. True is represented by T, and false is represented by F. The key to the quiz is on file quiz.dat, where it is followed by the student responses. Each student's name (maximum of 15 characters) immediately follows the student's last answer. For each student, write out the name followed by the number answered correctly and the number missed. Use stream failure to terminate processing. Exercise 2: An organization that your little cousin belongs to is selling low-fat cookies. If your cousin's class sells more cookies than any other class, the teacher has promised to take the whole class on a picnic. of course, your cousin volunteered you to keep track of all the sales and determine the winner Each class has an identification number. Each sales slip has the class identification number and the number of boxes sold. You decide to create two arrays: one to hold the identification numbers and one to record the number of boxes sold. The identification numbers range from 1 through 10. Here is a sample of the data: ID Number Boxes Sold 23 4 13 4 10 16 The first time an identification number is read, store it in the next free slot in the array of identification numbers and initialize the corresponding position in the array of boxes sold to the number sold on the sales slip. Each subsequent time an identification number is read, add the number of boxes sold to the corresponding position in the array of boxes sold. You may assume that each class sold at least one box of cookies the homeroom mothers had to buy one When there are no more sales slips, scan the array of boxes sold for the largest value. The identification number in the corresponding position in the array of identification numbers is the class that wins

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

More Books

Students also viewed these Databases questions