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:
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:
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started