Question: This is a Java program 1) You've been hired by Snow Superstars to write a Java console application that calculates and shows the total and

This is a Java program

1) You've been hired by Snow Superstars to write a Java console application that calculates and shows the total and average snowfall for three winter months. Configure the application in your development tool to receive the following three program arguments:

Integer snowfall for month 1 in inches.

Integer snowfall for month 2 in inches.

Integer snowfall for month 3 in inches.

Loop through the arguments array and print the index and value of each argument. Convert each argument from string to integer using Integer.parseInt(args[n]) and calculate the total and average snowfall. Format the total and average snowfall in two columns using escape sequences. The first column is a label and the second column is a value with units. The output should look like this:

Print out of the code//////////////////////////////////////

Welcome to Snow Superstars

--------------------------

Index Argument

0 2

1 6

2 5

Total: 13 inch(es)

Average: 4.333333333333333 inch(es)

End of Snow Superstars.

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!