Answered step by step
Verified Expert Solution
Question
1 Approved Answer
nung #buelitslearning.com/ContentArea/ContentArea.aspx?LocationID=42041&Location Type=18ElementID=1834019 some Courses Groups Calendar Support BAU BAUGO BAU Library CMP1001 (1-3) Introducti... Overview Plans Resources Status and follow-up Participants Write a program
nung #buelitslearning.com/ContentArea/ContentArea.aspx?LocationID=42041&Location Type=18ElementID=1834019 some Courses Groups Calendar Support BAU BAUGO BAU Library CMP1001 (1-3) Introducti... Overview Plans Resources Status and follow-up Participants 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 (is ViscosityAcceptable) 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. 5 10 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 79.5 Output 234 123478 23 Aramak iin buraya yazn i N
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