Create a Java program that prompts the user to enter rainfall amounts (in inches) for 12 months…

Create a Java program that prompts the user to enter rainfall amounts (in inches) for 12 months of one year. Your program must utilize an array of Month objects, which each hold the month’s name and the amount of rain in that month. Month Class Month.java) 1. The following private fields: monthName (String) – Name of the month. amount (int) – Amount of rainfall, in inches. 2. A public constructor that accepts two arguments. The first parameter is a String and is used to set the monthName field The second parameter is an int and is used to set the amount field 3. Two public accessor methods for retrieving the monthName and amount fields. RainFallAmounts Class (RainfallAmounts.java) This is the class that will contain the program’s main method and use an array of Month objects. In the main method: Create an empty array of Month objects; The length must be 12. Prompt the user to enter a rainfall amount for each month. If the user enters an amount less than 0, print an error message and prompt for a new value until the user enters a non-negative number. Once you have validated the entered amount, create an instance of a new Month object and use the month’s name and the entered amount as the constructor’s two arguments. o Add the newly created Month object to the array of Month objects. After storing all twleve Month objects into the array, your program will use the data contained in the array’s objects to determine and print: 1. The total rainfall for the year 2. The average monthly rainfall for the year 3. The month with the most rain 4. The month with the least rain When determining the months with the most and least rain, you do not need to account for ties. Use comments to adequately document your source code. See next page for sample input/output Sample Input/Output Please enter the rainfall amount for January: 5 Please enter the rainfall amount for February: 4 Please enter the rainfall amount for March: 3 Please enter the rainfall amount for April: 2 Please enter the rainfall amount for May: 1 Please enter the rainfall amount for June: 0 Please enter the rainfall amount for July: -6 Invalid amount. Try again. Please enter the rainfall amount for July: -2 Invalid amount. Try again. Please enter the rainfall amount for July: 2 Please enter the rainfall amount for August: 3 Please enter the rainfall amount for September: 4 Please enter the rainfall amount for October: 5 Please enter the rainfall amount for November: 6 Please enter the rainfall amount for December: 7 The total rainfall is 42 inches. The average monthly rainfall is 3.50 inches. The month with the most rain was December. The month with the least rain was June.
Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!