Even complicated and confusing topics will be easily developed and covered if you request our help writing an essay. Place an order today!

1.

Provide Java code to create and initialize an array of integers (Java primitive int), floats or any other Java primitive type of your choice.

You pick the array name and length.

Demonstrate how you would determine the length of your array. Show this through a code example you create where you use the length member.

 

2.

Write a Java application that allows a user to enter numbers into an array and then process them. 

Enter the number of elements and the value of each element;

Your application will process the data entered and will display the results:

1.     Display the elements of the array, max 10 per line

2.     Find and display the min value and the index of this min;

3.     Display the odd elements;

4.     Sorts and displays the numbers from highest to lowest using Arrays.sort() method from java.util.Arrays class and some extracode.

 

It is recommended to design and implement the methods:

getMin                                  - find the minimum element of the array;

getIndexOfMin                    - find the index of the maximum element (first if the are many);

displayOdd                           - find the and display the odd elements;

displayArray                         - display the elements of the array;

 

Example:

How many values you want to input:15

Enter number 0 :21

Enter number 1 :22

Enter number 2 :23

Enter number 3 :24

Enter number 4 :25

Enter number 5 :26

Enter number 6 :27

Enter number 7 :1

Enter number 8 :2

Enter number 9 :3

Enter number 10 :4

Enter number 11 :5

Enter number 12 :6

Enter number 13 :7

Enter number 14 :8

Thanks! Here is your array:

21, 22, 23, 24, 25, 26, 27, 1, 2, 3,

4, 5, 6, 7, 8

Min value entered was 1 and has the index: 7

Odd values entered:

21,23, 25,27,1,3,5,7

Descendig Sorted Array is:

27, 26, 25, 24, 23, 22, 21, 8, 7, 6

5, 4, 3, 2, 1

 

testimonials icon
*Class, z scores are not really very practical for dissertation research/quantitative methods. The MOST important value to identify and understand...
testimonials icon
  Discussion #1The proposed Employee Free Choice Act (EFCA) - h...
testimonials icon
The topic is finding child care. Instructions are attached....
testimonials icon
Mary is a 41 year old woman who lives with her husband and three children aged 17, 14 and 10 years. Mary holds down a responsible position in a l...
testimonials icon
In this third paper, you are going to describe your airport’s landside, with a focus on the terminal, ground access, aircraft parking/configurati...
testimonials icon
i need help on exam on programming ...
testimonials icon
Main HeadingsWhat is the research question or issue in this study?Was the problem clear?Is the problem significant for nursi...
testimonials icon
In your PowerPoint Assignment Address the following:Define project controlList and briefly describe...
testimonials icon
Nurse’s Role in Influencing the Legislative Process  For this week’s project, you’ll answer three questions related to your opportuni...
testimonials icon
You will perform a history of a head, ear, or eye problem that your instructor has provided you or one that you have experienced and perform an as...
testimonials icon
I need immediate answers only. Need to turn this presentation in ASAP. Here is the description of the assignment: PLEASE INCLUD...
testimonials icon
  The joint task force has asked for your assistance with a new case. They have asked you to plan and conduct the preliminary passive scan...

Other samples, services and questions:

Calculate Price

When you use PaperHelp, you save one valuable — TIME

You can spend it for more important things than paper writing.

Approx. price
$65
Order a paper. Study better. Sleep tight. Calculate Price!
Created with Sketch.
Calculate Price
Approx. price
$65