Question: write c++ Assignment Write a program that checks the viscosity of shampoo bottles coming from a production line using a function. For each bottle, the

write c++ write c++ Assignment Write a program that checks the viscosity of shampoo

Assignment Write a program that checks the viscosity of shampoo bottles coming from a production line using a function. For each bottle, the viscosity value must be CLOSE to its ideal value. However, due to manufacturing problems viscosity varies from bottle to bottle. First, the program will read the number of bottle (numBottle) as an int. Then, the ideal viscosity value will be given (idealvis) as a double followed by the tolerance level (tolLevel) as a double. Lastly, one by one the viscosity for each bottle will be given as double values. The program will check the viscosity value of each bottle using a function (isViscosityAcceptable) that gets necessary items as parameters and returns a bool value. The main function will print out the index of the "valid items" as int values. An item that is WITHIN the tolerance boundary is a "valid item". The tolerance boundary can be calculated with the following formulas; Lower Boundary = idealvis - (idealVis * 2.2*tolLevel) Upper Boundary = idealvis + (idealvis * 1.2*tolLevel) NOTE: The viscosity acceptability check MUST be done in the function. And printing the result to the screen MUST be done in the main function. NOTE: The index number of the first bottle is 1, NOT O. 510 0.10 Input 59.8 9.5 11.2 22.1 8 9.5 0.12 6 105 0.20 99.9 10.2 8.2 12 11 132 98 106 205 4 30 7 9.5 234 1 2 3478 23 Output Answer assignment

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!