The input file will be organized as follows: • The first number in the file indicates the number of records the file contains. • After that, the records are composed of the month name followed in the next line by the amount of rain in millimeters (mm) • The file can contain any number of months ranging from 0 to 12, January 45.6 February 45.5 March 74.2 Your program must: 1 Read the contents of the file into two arrays. 2. Sorts the amount of rainfall from lowest to highest and displays the sorted information on the screen April 76.6 3. Allows the user to search for a month and displays the corresponding rainfall amount for that month. 4. Calculates and displays the total and the average amount of rainfall for the year. 5. Allow the user to enter a file name. File name should not assume any particular format. For example, the user should enter whatever filename they decide as long as it exists. (i.e, rain.txt is a possible name) Enhancement: Give an appropriate error message if the file does not exist
The input file will be organized as follows: • The first number in the file indicates the number of records the file contains. • After that, the records are composed of the month name followed in the next line by the amount of rain in millimeters (mm) • The file can contain any number of months ranging from 0 to 12, January 45.6 February 45.5 March 74.2 Your program must: 1 Read the contents of the file into two arrays. 2. Sorts the amount of rainfall from lowest to highest and displays the sorted information on the screen April 76.6 3. Allows the user to search for a month and displays the corresponding rainfall amount for that month. 4. Calculates and displays the total and the average amount of rainfall for the year. 5. Allow the user to enter a file name. File name should not assume any particular format. For example, the user should enter whatever filename they decide as long as it exists. (i.e, rain.txt is a possible name) Enhancement: Give an appropriate error message if the file does not exist
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please help me with this using java

Transcribed Image Text:The input file will be organized as follows:
• The first number in the file indicates the number of records the file contains.
· After that, the records are composed of the month name followed in the next
line by the amount of rain in millimeters (mm)
• The file can contain any number of months ranging from 0 to 12.
January
45.6
February
45.5
March
74.2
Your program must:
1. Read the contents of the file into two arrays.
2. Sorts the amount of rainfall from lowest to highest and displays the sorted
April
76.6
information on the screen.
3. Allows the user to search for a month and displays the corresponding
rainfall amount for that month.
4. Calculates and displays the total and the average amount of rainfall for the
year.
5. Allow the user to enter a file name. File name should rnot assume any
particular format. For example, the user should enter whatever filename
they decide as long as it exists. (i.e. rain.txt is a possible name)
Enhancement: Give an appropriate error message if the file does not exist
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY