A machine is manufacturing ball bearings and, at equal time intervals during a p
ID: 3623962 • Letter: A
Question
A machine is manufacturing ball bearings and, at equal time intervals during a production run, a ball bearing is sampled and its diameter is measured. Each ball bearing should have a diameter of 2.0 mm.Your program will keep track of how many ball bearings were sampled that were NOT excessively large (> 2.05) or excessively small (<1.95). The program should not waste time reading further from the file once a bearing is found out of this range.
The program must report the following:
1. The size of the each ball bearing read from the data file.
2. A running total of how many ball bearing sizes have been read.
3. At the end of the program, both of the following must be reported:
a) Why the program stopped reading in data (e.g. last ball bearing size too big, last ball bearing size too small, or end of file found because all good bearings).
b) Final count for how many good ball bearing sizes were read in.