JAVA CODE with a main() method that asks the user to input an integer array of 10 elements. Next, create three methods described below. From inside your main() method, call each of the three methods described below and print out the results of the methods 2, 3, which return values. 1. printReverse() - a method that receives an array of integers, then reverses the elements of the array and prints out all the elements from inside the method. Print all in one line separated by commas (see sample output below). Do not print the ‘trailing’ comma!! 2. getLargest() – a method that receives an array of integers, then returns the largest integer value in the array. Return largest integer and print from main(), not method. 3. computeTwice()- a method that receives the previously reversed array of integers, then returns an array of integers which doubles the value of each number in the array (see the sample output below). Return new array of integers print from main(), not method.. THE OUTPUT SHOULD BE IN THE FORMAT AS SHOWN BELOW USING COMMAS AN IN A STRAIGHT LINE USING A JAVA CODE

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a JAVA CODE with a main() method that asks the user to input an integer array of 10 elements.
Next, create three methods described below. From inside your main() method, call each of the
three methods described below and print out the results of the methods 2, 3, which return values.

1. printReverse() - a method that receives an array of integers, then reverses the elements of
the array and prints out all the elements from inside the method. Print all in one line
separated by commas (see sample output below). Do not print the ‘trailing’ comma!!
2. getLargest() – a method that receives an array of integers, then returns the largest integer
value in the array. Return largest integer and print from main(), not method.
3. computeTwice()- a method that receives the previously reversed array of integers, then
returns an array of integers which doubles the value of each number in the array (see the
sample output below). Return new array of integers print from main(), not method..

THE OUTPUT SHOULD BE IN THE FORMAT AS SHOWN BELOW USING COMMAS AN IN A STRAIGHT LINE

USING A JAVA CODE 
EXAMPLE OUTPUT:
Enter a number:
22
Enter a number:
34
Enter a number:
21
Enter a number:
35
Enter a number:
12
Enter a number:
4
Enter a number:
2
Enter a number:
3
Enter a number:
99
Enter a number:
81
Here the array in reverse: 81, 99, 3, 2, 4, 12, 35, 21, 34, 22
The highest valued element: 99
The array with two times each element: [162, 198, 6, 4, 8, 24, 70, 42, 68, 44]

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education