Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Due April 9, 2018 (Monday), 9.0Ba Write a method that returns an int array using user's inputs from the console window. The method should have

image text in transcribed
Due April 9, 2018 (Monday), 9.0Ba Write a method that returns an int array using user's inputs from the console window. The method should have the following header. The formal parameter size is the size of the return array 1. > public static int [] inputArray (int size) 2. Write a method that calculates and returns the average of an array with the following headers. >public static double average (int list) Write a method to add two int arrays, assuming that arrays referred by variables a and b are of the same size. The header of the method is as follows. 3. > public static int[1 add (int[] list1, int[] 1ist2) The add method should return an array of the same size as the input arrays, with each element to be the sum of the elements from the input arrays. For example, if the two input arrays are [3, 1,2,6, 4, 2] and [1, 2, 3, 4, 5,6], the returned sum array should be [4, 3, 5, 10, 9, 8] Write a method to display an int array's contents on the console window. The header of the method is as below. . public static void displayArray (intl list) Write the main method to: a. Create two input arrays with the same size by invoking the inputArray method twice in the main method. b. Calculate the average of the first int array by invoking the average method. Display the average result on the console window. Calculate the array sum of both input arrays by invoking the add method. c. d. Display the sum array by invoking the displayArray method rading: This assignment is worth 100 points. If your program has compilation or run time rors, you will receive 0 point. Grade criteria Correct result and output roper implementation of all features specified in the program Proper style and documentation Maximum points 40 40 20

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

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions