Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the code in C++ Language!! Write a program that checks the quality of the products coming from a production line using a function. For

image text in transcribed

Write the code in C++ Language!!

Write a program that checks the quality of the products coming from a production line using a function. For each product, there is a compound whose quantity must be CLOSE to its ideal value. However, due to manufacturing problems this quantity varies from product to product. First, the program will read the number of products (num Prod) as an int. Then, the ideal value of the compound will be given (idealval) as a double followed by the tolerance level (tolLevel) as a double. Lastly, one by one the quantity of the critical compound for each item will be given as double values. The program will check the critical compound value of each product using a function (isQuantityAcceptable) that gets necessary items as parameters and returns a bool value. The main function will print out the index of the "defective items as int values. An item that is OUTSIDE the tolerance boundary is a "defective item". The tolerance boundary can be calculated with the following formulas; Lower Boundary = idealval - (idealval * tolLevel) Upper Boundary = idealval + (idealval * tolLevel) NOTE: The quantity 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 product is 1, NOT O. 5 10 0.10 8 9.5 0.12 6 105 0.20 Input 5 9.8 9.5 11.2 10.1 99.9 10.2 8.2 12 11 7 9.5 102 98 110 105 104 130 Output 14 4 5 6 7 6 6

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

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions