Question: C++ Lab 6 Fall 2017 Lab Instructions: The file lab6data.txt holds the names and grades for the students in a math class. Your program will

C++ Lab 6

Fall 2017

Lab Instructions:

The file lab6data.txt holds the names and grades for the students in a math class. Your program will calculate and display the average for each student, as well as their highest grade, and calculate and display the average for the whole class, as well as the highest grade.

The number of grades for each student is unknown.

The last grade for each student will be -1, which is not an actual grade.

The number of students is unknown. You must keep reading in student data until there is no more

The class average is the average of the students averages.

If a student has no grades (except for the -1), their average is 0.

If there are no students in the class, the class average is 0.

Hint: You should not try to read in all the data from the file before doing any calculations or output. Much of it can be done one student at a time. Figure out the problem for one student, then determine how to accomplish that for a number of students

For example, if the data file contains the following data:

Sue Storm 95 76 89.3 99.2 91 -1

Reed Richards 76 85.5 89.25 -1

Bruce Banner 54.5 67.8 75 88.3 -1

Example: C++ Lab 6 Fall 2017 Lab Instructions: The file lab6data.txt holds the

Now write a C++ program using the lab6data.txt (I will upload the picture)

Please use internal documentation

The data file contains the following data:

names and grades for the students in a math class. Your program

A radioactive substance is decaying at a rate directly proportional to its size. The amount substance after t years is given by N (t) = 14e^-.15t. (a) How fast is the substance decaying when 6 grams are remaining? (b) How many grams are remaining when it is decaying at a rate of 36 grams per year? A radioactive substance is decaying at a rate directly proportional to its size. The amount substance after t years is given by N (t) = 14e^-.15t. (a) How fast is the substance decaying when 6 grams are remaining? (b) How many grams are remaining when it is decaying at a rate of 36 grams per year

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