Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 Build a program (application) in Java, which creates a single dimensional array with 31 elements, which will store the temperatures during the month

Exercise 1

Build a program (application) in Java, which creates a single dimensional array with 31 elements, which will store the temperatures during the month of January, in degrees Celsius.

Build the following functions and call them at the main method of this application.

1. Build the function that fills the vector with data entered during execution through dialog boxes.

/ * @return (returns) the array filled with data entered by the user * /

public int [] fillArray ()

}

2. Build a method that calculates the average temperature of the month and displays the days that have a temperature lower than the average temperature.

/ * @param int [] temp - the array that holds the temperatures of the month * / public void tempBelowAverage (int [] temp) }

3. To build the function that calculates the minimum temperature during the month of January.

/ * @param int [] temp - the array that stores the temperatures of the month

* @return (returns) the minimum temperature

* /

public int tempMinimal (int [] temp)

}

4. To build the method that displays how many days of the month have temperatures equal to a given temperature. / * @param int [] temp - the array that holds the temperatures of the month * @param valueTemp - specific temperature required in the array* / public void (int [] temp, int valueT) } 5. Build the method that displays the temperatures of January in descending order.

/ * @param int [] temp - array that holds the temperatures of the month * / public void orderArray (int [] temp) }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

What is meant by 'Wealth Maximization ' ?

Answered: 1 week ago