Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java please this part is due with Project 3 Arrays are a very powerful data structure with which you must become very familiar . Arrays

java please

this part is due with Project 3

Arrays are a very powerful data structure with which you must become very familiar. Arrays hold more than one object. The objects must be of the same type. If the array is an integer array then all the objects in the array must be integers. The an object in the array is associated with an integer index which can be used to locate the object. The first object of the array has index 0. There are many problems where arrays can be used. After the topic of arrays has been covered create arrays of class Temperature. Write a program that satisfies the next 6 requirements using Temperatures. Create a class similar to the Math class. Put the next 5 static methods in it. (These static methods could also be in the Demo class.) On my website are two example programs that demonstrate passing arrays and returning arrays: Passing Arrays using static methods and ChangeArgumentDemo. Use the random number generator as described on the bottom of page 412 to create 3 arrays of random sizes of 1 to 5 elements.

1) Create a static void method that has an array parameter and is called 3 times to read in Temperature values for each array.
2) Create a static method that computes and returns the average Temperature for each array and is also called 3 times.
3) Create a static method that prints the Temperatures of an array.
4) Create a static helper method that has 3 array parameters and either returns the largest array or the largest size.
5) Create a static method that returns an array of Temperaturesthat has the same number of elements as the largest of the three arrays. This method will have 3 array parameters and possibly an integer parameter. It determines the largest Temperature value from the three arrays at each index and creates a copy of this Temperature and stores it at that index of the new array. This array is then returned.
6) As this program is running it should generate user friendly text for input and output explaining what the program is doing.

Create a set of test value Temperatures that demonstrate that your program runs correctly. (My website gives sample output to follow.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago