Problem A concrete manufacturing company is developing five
Problem:
A concrete manufacturing company is developing five new formulations to use for highways. To ensure that the formulations produce similar results when they are prepared by plants in different locations, the company has asked each of the seven plants to prepare each formulation and measure the compressive strength after 180 days of curing. You have been asked to develop a program to help analyze the data. Your program should have a main function and 3 other functions as described below. One function should confirm that the entered value for compressive strength is between 15 and 75 MPa inclusive. This function should accept the compressive strength to be checked and the plant number that measured this strength and prompt the user to re-enter the compressive strength for that plant until a valid value is entered. This function should return a valid value to the function call.
One function should accept the 7 compressive strengths from a plant and send back to function the highest and lowest of the 7 compressive strengths to the function call.
One function should accept the 7 compressive strengths of a specific formulation and calculate the average of the strengths for that formulation without the highest and lowest strength. This function should call the function to determine the lowest and highest compressive strength for a plant, then calculate the average. The average should be returned to the function call.
The main function should prompt the user to enter the compressive strength for a formulation from each plant one at a time and call the function to ensure the entered value was valid . Next main should call the function to calculate the average of the values from the plants. This process should be repeated for each of the 5 formulations. The main function should output the average for each formulation to two decimal places. Sample output is given below.
Do not use any concepts beyond Chapter 6 (e.g. do not use arrays) to complete this project. Make sure that you have included your introductory comments containing the purpose of the program i.e. what problem or task is being solved plus the input needed from user to complete the problem/task, output expected from the program, and the processing needed to get the output from the input. The description of the purpose should be detailed enough that a person reading your code would not need any additional information to understand the problem. The processing comments should not include any C++ commands.
Solution
you are correct to do this with the aid of induction, but you\'ll want structural induction that follows the tree structure. For trees, that is regularly finished as complete induction over the height h(T)h(T) of the timber.
The induction anchor has elements. First, for h(t)=0h(t)=0 we\'ve got T=EmptyT=Empty with lT=nT=0lT=nT=zero; the declare clearly holds for the empty tree. For h(t)=1h(t)=1, i.e. T=LeafT=Leaf, we further have lT=1=nT2lT=1=nT2, so the declare holds for leaves.
The induction hypothesis is: count on that the claim holds for all (binary) timber TT with h(T)kh(T)ok, ok1k1 arbitrary but constant.
