i can not understand my Home work plz help me

this is the Question ......

Problem 1. Write a program in which you will do the follwing:

1. Declare a two-dimensional array of double with 12 rows and 30 columns
to store daily temperatures for one year assuming each month is exactly
30 days.

2. Fill the array with random numbers from 0.0 to 50.0.

3. Display the hottest and coldest days of the year.

4. Display the average temperature of each month.

5. Display the temperature of any given day specified by the user. The
day is specified by two input values: month (1, 2, ..., 12) and day (1, 2,
..., 30). Reject invalid input values (e.g. 13 for month and 32 for day).
Repeat this last step until the user decline to continue.

## All 7 Replies

Have you written any of it?
Which part is the problem?

i can not understand my Home work plz help me

this is the Question ......

Problem 1. Write a program in which you will do the follwing:

1. Declare a two-dimensional array of double with 12 rows and 30 columns
to store daily temperatures for one year assuming each month is exactly
30 days.

2. Fill the array with random numbers from 0.0 to 50.0.

3. Display the hottest and coldest days of the year.

4. Display the average temperature of each month.

5. Display the temperature of any given day specified by the user. The
day is specified by two input values: month (1, 2, ..., 12) and day (1, 2,
..., 30). Reject invalid input values (e.g. 13 for month and 32 for day).
Repeat this last step until the user decline to continue.

What are you not understanding how does your code look so far? because if you have nothing, a quick google on for loops/statements, and 2d arrays and assigning/printing 2d arrays in java should get you started?

that is the question. what is your response on it? we're not going to write the entire code for you, just try and we'll help you work out the errors.

i can not understand

3. Display the hottest and coldest days of the year.

what don't you understand about that?? you have to look what is the smallest and the highest value for temperature and display that on your screen

i solve every problem

but i can not understand step 5 > can you explain it plz ?

i solve every problem

but i can not understand step 5 > can you explain it plz ?

Well now all you do is ask the user to input the day and month of the temperature they want to view... Use the Scanner class for this. Then check the input to make sure that the day they chose is not greater then 31 if anything wasnt correct call the menu to ask for input again and maybe use -1 to exit, so if the user types -1 it will no longer continue to ask for the day or month and the program will terminate.. and that the month is not greater then 12 then just use those values to get the correct value at those indexes of your 2d array... Hope that helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.