Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 (50 points) The name of the C++ file must be temperature.cpp Write a program that will read temperatures in Fahrenheit from a file

image text in transcribed

Problem 2 (50 points) The name of the C++ file must be temperature.cpp Write a program that will read temperatures in Fahrenheit from a file and store these values into an array. The program will allow the user to specify the filename (check "UserSpecifyFilename.pdf" for how to do this). Use a loop that will check if the file opened correctly, otherwise display an error message and allow the user to re-enter a filename again until successful. Read the values from the file and store into the array The program will then call these functions a function that will return the average of the temperatures, a function that will return the highest temperature, a function that will return the lowest temperature a function that will return the number of values in the array with temperatures greater thar or equal to 85, and a function that will convert the temperatures from Fahrenheit to Celsius AND write the new values to celsius.txt. . . For all functions, you will pass the array and any other needed arguments. The main function will then display the returned values (data statistics) and the total number of temperatures read from the input file. Also, inform the user with the created celsius.txt file. Design a good user interface Assume that the maximum number of values in the input file will not exceed 100. The average should be displayed to two decimal places. Make sure to use the const keyword on the array parameter on any function where it is appropriate Do not use any global or reference variables Design your program before typing the code. Use temps.txt as a sample input file

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions