Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For C++ code C++ goals: using loops Problem: A local company, Molding Supreme, produces molds to cast various shapes. However, the molds become scratched after

For C++ code image text in transcribed
C++ goals: using loops Problem: A local company, Molding Supreme, produces molds to cast various shapes. However, the molds become scratched after many uses and need to be replaced which costs a lot of money Therefore the company has been researching various formulations mold materials and heat treatments to produce a material that is not too expensive and that resists scratching. You are asked to develop a program that will help the researchers analyze the data. The researchers use multiple formulations and apply various heat treatments to these formulations. The researchers need highest and second highest hardness for each formulation a program to determine the Your program should ask the user to enter the formulation name. Next your program should ask the user how many heat treatments were used for that formulation. The number of heat treatments must be at least 3. The user should then be formulation and output the highest and second highest hardness for that formulation. prompted to enter a hardness value for each of the treatments of that Your code should use a single string object to store the name of the formulation, a while loop to check that the number of heat treatments is at least 3, a for loop to enter the hardness for each heat treatment and to determine the highest hardness and second highest hardness values, a while loop to ensure that the hardness is greater than 0 and less than or equal to 11 and a do-while loop to repeat for additional formulations. Sample outputs are given below Make sure that your code follows the assignment guidelines posted on Canvas. Your code should not use arrays or concepts beyond Chapter 5 of your textbook. Upload your source code as a submission for Project 2. Make sure that your code follows the Assignment Guidelines posted on Canvas. Output 1 What is the name of the formulation? Tungsten Carbide 451 How many heat treatments were used for formulation Tungsten Carbide 4512 5 Enter the hardness for treatment 1 of formulation Tungsten Carbide 451.9.89 Enter the hardness for treatment 2 of formulation Tungsten Carbide 451. 8.34 Enter the hardness for treatment 3 of formulation Tungsten Carbide 451.9.93 Enter the hardness for treatment 4 of formulation Tungsten Carbide 451. 8.99 Enter the hardness for treatment 5 of formulation Tungsten Carbide 451. 10.02 The highest hardness for Tungsten Carbide 451 was 10.02 mohs and the second highest hardness waS 9.93 mohs Are there more formulations? (y) n

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

More Books

Students also viewed these Databases questions

Question

Address an envelope properly.

Answered: 1 week ago

Question

Discuss guidelines for ethical business communication.

Answered: 1 week ago