Question
C++ Program Problem Goal: practicing nested loops Problem: You have been asked to develop a program to help analyze data obtained from a company manufacturing
C++ Program Problem
Goal: practicing nested loops Problem: You have been asked to develop a program to help analyze data obtained from a company manufacturing widgets for heat transfer. The company makes batches of 100 widgets at a time. After production, the company measures the thermal conductivity of each widget.
You should create a program that will prompt the user to enter the batch name and the thermal conductivity of each widget one at a time, determine the minimum conductivity for that batch, determine the maximum conductivity for that batch, and the determine the average conductivity for that batch. When the user enters an invalid conductivity measurement of below 3 or above10, he/she should be told that the entered conductivity measurement is invalid that the user should be prompted to enter the conductivity again as long as he/she enters an invalid conductivity measurement. The evaluation process should be repeated as long as there are more batches to be analyzed (do not ask the user to enter the number of batches).
The output of your analysis for one batch should be similar to that given below with appropriate values in the blanks.
Batch _____________ had an average thermal conductivity of ________________, a minimum thermal conductivity of _____________________ and a maximum thermal conductivity of ________________________.
Use a for loop to allow the user to enter the thermal conductivity of each widget in a batch. Use a while loop to check the validity of the users input and prompt to re-enter invalid numbers. Use a do-while loop to repeat the process for other batches.
Note: develop your program using batches (e.g. 10 to 15 widgets), then once you know your program is running change to 100 widgets per batch.
Thanks a lot
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