Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++ image text in transcribed
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

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

Describe ERP and how it can create efficiency within a business

Answered: 1 week ago