Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ on zybooks The lab exercise this week (FYL you might want to wait to do Lab4 before completing this, it will be released Wednesday

C++ on zybooks

image text in transcribed

The lab exercise this week (FYL you might want to wait to do Lab4 before completing this, it will be released Wednesday after lecture) was to write a program to compute and output Ultimate Tensile Strength (UTS) values for a range of temperatures: 100, 125,150,175, 200, 225, 250, 275, 300, 325,975, 1000. Recall that most metals weaken as temperature increases, and the UTS of most metals is accurately predicted by the following equation UTS 1.0 (T/1000EXP where Tis the current temperature (degrees Celsius) and EXP is a real number based on the type of metal. UTS is expressed as a value in the range 0.0 to 1.0, where 1.0 means the metal is at full strength, and 0.0 means the metal has no strength whatsoever. You can think of UTS as a percentage: 10-100%, and 0.00% In this exercise you're going to write a program that inputs three values the EXP value for a particular metal (as a real number), the starting temperature T (real number), and the temperature increment I (real number). The program then computes and outputs the UTS for this metal starting at T degrees (Celsius), and every I degrees thereafter, stopping after 1000 degrees. Example: given the following inputs for EXP T, and L, in this order 50.0 100.0 Your program should output 50: 0.9975 150: 0.9775 250: 0.9375 350: 0.8775 450: 0.7975 550: 0.6975 650: 0.5775 750: 0.4375 850: 0.2775 950: 0.0975 Assume the inputs are valid, ie. positive real numbers. PROGRAMMING INSTRUCTIONS Zyante contains a complete C++programming environment, so you are free to work here. Zyante provides 2 modes Develop" and Submit". In Develop mode, you supply the input values in the text field provided, then click Run program to run your program and see the output. This gives you a chance to develop and test your program as you see fit When you are ready to submit your program for grading, switch to Submit mode, and click Submit for grading. This will run your program against the provided test cases (some of which may be hidden). The zyante system will submit a copy of your program, along with your score. In this assignment you may submit as many times as you want without penaltyzyante records your highest score. If you fail to pass a test, keep in mind that auto-grading systems demand 100% precision. For example, your answer will be marked as incorrect if you do not output the requested values in the desired format extra spaces or missing newlines will be marked as incorrect. Compare your output to the expected output to determine whats wrong Does zyante save your work? Zyante saves the most recent copy that you submittedi.e. the last time you clicked the Run program or Submit for grading button. If you close the browser and reload the web page, this is the version of the program you will see. There is no way to go back to earlier versions, or save your current work unless you Run/Submit. For this n, it is recommended that you save your w ork in an editor or word processor You are free to work outside of zyante in a programming environment of your choioe, but you must submit for grading using the zyante system copy paste your program into zyante, switch to Submit mode, and Submit for grading. Note that different programming environments have different defaults, so it's quite possible that a program working outside of zyante will fail when run inside zyante. This is not an error in the zyante systemthis means there is a logic error in your program. The most common mistake is failure to initialize a variable. If your program fails to produce output here in zyante, then switch to Develop mode, supply some test inputs, and Run program. Make sure your program compiles, and runs to completion. Add output statements if you need to debug further

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 Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

What is the concept of double indemnity?

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago