Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For Java only Sorry that this is so long but its all one problem Problem 1 Write

ID: 3769510 • Letter: F

Question

For Java only

Sorry that this is so long but its all one problem

Problem 1

Write a program to accomplish the following tasks:

                1) make a random number between 10 and 100;

                2) make an array of the size of the random number;

                3) fill the array with random integers from 0 to 999;

                4) print lines of output for each of these:

                                a)            the original members of the array

                                b)            every element at an even index based on the original displayed array

                                c)            every even element based on the original displayed array

                                d)            the reverse of the original array

                                e)            the first and last element based on the original displayed array, use the length                                                  not a literal number

                                f)             swap the first and last element based on the original displayed array

                                g)            shift all elements to the right once, move the last element to the first based on                                                                the original displayed array

                                h)            replace all even elements with the number zero based on the original displayed                                                               array

                                i)             replace each element except the first and last with the larger of its two                                                                                 neighbors based on the                original displayed array

                                j)             remove the two middle elements based on the original displayed array

                                k)            move all odd elements to the front otherwise preserving the order of the array                                                                based on the original displayed array

                                l)             display true if the original array is stored in increasing order

                                m)          display true if the array contains two adjacent elements that are equal

                                n)            compute the alternating sum of all elements in the array, for example: 1 2 3 4 5                                                                 would be computed as 1 - 2 + 3 - 4 + 5 ...

                                o)            display a bar chart equal to the value of the number in each element, for                                                             example: 1 2 3 4 5 would display as:

                                                *

                                                **

                                                ***

                                                ****

                                                *****

               

Problem 2

take problem 1.o (the last problem directly above) and make it work for negative numbers.

Once again I apologize for the length but it is almost one problem and problem 2 you need problem 1 to sove, Thank you so much !!!

Explanation / Answer

import java.util.Random; public class ordering {     public static void main(String[] args) {                   Random randGen = new Random();         int[] numbers = new int[randGen.nextInt(100-10)+10];         int i = 0;         double limit =0;                             {         for ( i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote