Yourmidtermproject this semester isan exercise in following specifications using concepts andconstructs you’ve worked with so far this semester.You’ll be doing a lot of calisthenics withfunctions! The project is a temperature creation and analysis program.You have available toyou the materials from Chapters 2–6 in our textbook with a few omissions (those will bementionedin asupplement). You are toconstruct a working C++ program that completes thefollowing tasks as specified, test it for correctness and include a write-up with test casesdemonstrating itscompleted level of functioning.(I’m sure there will be some holes in these specs–speak toyour user?and make your bestjudgement calls to fill in those holes)The program shall:•Have a menu with 4 options: 1 for each of the following choices and 1 to quit thetemperatureplay program•Option:Generate random temp file•Option:Determine temp stats•Options:Generate temp conversion table•Each of these 3 main options should be a function call to the associated section of code.Option-Generate random temp file-is a function that willcreate a file meeting the user’sneeds. It must:•Ask the user for:othe user’s last nameoif the temps generated are Fahrenheit or Celsius valuesothe range of temps to generate [low temp, high temp]othe number of temps to generateoeach of these prompts and their processing should be handled in afunction call to the associated section of code(specs below)•Once all the info is gathered send the name, temp type, range values andnumber of temps to a function GenFile(specs below)for processing and filecreation.•The user’s last name:oAcquires and returns theuser’s last name to the calling function?Make use of tolower()–a C++ function to force all the letters ofthe name to be lowercase.•Temp type:oAcquires the temperature type, returning ‘F’ or ‘C’ to the calling function?Include error handling–reentryuntil goodentry•Temp range:oAcquires the range of temps and returnsthe lower and upper bounds tothe calling function?Include error handling (upper value ?If the user chooses to re-enter their last name continue this process untila file is found/generated?If you need to generate an input file callGenFile–Alert!–will have
todeal with a question that will arise–you’ll see when you get there?•GenStatsaccepts as input the filenameand variables that indicate the stats to begenerated?Open and read the input file and as reading temp data?Generate the max, min and sum of values in a loop. To calculate the maxand min call two functionsgetMaxValue,getMinValue?Call a functiongenOutputto write the outputogetMaxValueandgetMinValueeach accept two parameters–the currentmax(min) and the new value being compared–each returns the new max(min)value of the input pair.ogenOutputaccepts (you determine the required parameters)?ask the user if they want the results written to the screen or an outputfile or both. When presenting output–make it clean, understandable andinclude the input file name, if Fahrenheit or Celsius, the temp ranges, thenumber of values analyzed and the requested results (min, max, and/oravg). You determine how you want to utilize functions to completegetOutputOption–Gen Temp Conversion TableThisoption shallallow the user to supply you with their last name(you’ve alreadywritten a function that gets it and makes it lowercase)and you are to createa file called(lastname)+”conversion.txt” Can you think of how you can generalize GenFileName so it can beused for this filename construction as well as the input file name construction? You can do it…it requires adding a parameter. Do it!?Ask the user if they wish to build a conversion tablefrom an input file orfrom keyboard entry.•If from their input file do what’s needed following your above processes to open the fileand read the data–write an output file with each of the data values and theircorresponding Fahrenheit/Celsius value in a nicely labeled and laid out table.•If the user wants you to generate a table from keyboard entry. Ask them for the inputtype (Fahrenheit/Celsius) the number of values they want in the table and the lower andupper bounds of the table range. Generate a table that meets these requirements.Gen Temp Conversion Table is to be designed by you other than the use of your updatedGenFileName function. You should have at least five(not a magic number)functions in thissection of the program. (hint–FtoC, CtoF (write your own) and ?… what do you think?