Question: Write a program from your flowchart that reads an input file that contains two fields from any number of records .(Could be thousands of records!)

Write a program from your flowchart that reads an input file that containstwo fields from any number of records.(Could be thousands of records!) The first field contains a number from 1-7. 1 represents Monday, 2 - Tuesday and so forth thru 7 which represents Sunday. The second field on each record will be a temperature for that day of the week. (There will be multiple records for each day of the week and can be in any order in the input file.)

Example of fields from each record of the input file;

DOW TEMP

Example of possible records from input file;

1 62

2 54

7 55

6 77

1 55

continues on with any amount of records....could be a few or thousands!

Assume that all input records will contain valid information.

Temps could be negative.

Load all your information into ARRAYS!

NEW! Use this Java line of code to display the contents of your tables after you load them. This is a good way to insure that your tables are loaded correctly. It is considered a debug line and should be removed before you turn in your final code.System.out.println(Arrays.toString(tempArray));

Your program will find the High, Low and Average Temperature for each day of the week. Then it should write out a new record to an output file for each day of the week.(The output file will only contain 7 records. One for each day of the week.) Each output record will contain these fields; DOW, HighTemp, LowTemp, AverageTemp. Also include in your program status output displays to the screen to indicate when the program has started and ended. Example:

DOW Temperature Started. Please wait....

DOW Temperature Completed Successfully.

Example of fields contained in each record;

DOW HIGH LOW AVERAGE (These field names are not in the output file.)

Example of possible values that might be contained in an output record;

1 78 66 70

2 87 77 81

3 70 80 75

Etc....

The output file MUST contain 7 records. One record for each day of the week! Put 0 for the high, low and average if no records were found for any day of the week.

Here is the flowchart:

Write a program from your flowchart that reads an input file that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!