Question: * * Major Method Project * * You are taking over a project from a co - worker who has been fired for lying about
Major Method Project
You are taking over a project from a coworker who has been fired for lying about being able to code Java.
You must now pick up from where he left off, luckily he was decent at commenting his code, just had a terrible attitude.
Sample Run:
Here are the numbers in the array:
Here are the numbers in the array reversed:
Please give me an integer value and an insert point between
Here are the numbers in the array final result:
import java.util.Scanner;
import java.util.ArrayList;
append your last name to the class name, and saveAs the file as the same thing
class MethodProj
insert the integer in the index position and move all elements right the th index will fall off
public static void insertValueint array int num, int index
reverse the order of the elements
public static void reverseint rev
print the array
public static void printitint x String s
randomize method will fill in elements with random numbers from
public static void randomizeint x
you do not need to do anything to this main method,
you need to make the methods above that they call work.
public static void mainString args
Scanner scan new ScannerSystemin;
int randomNums new int ;
populate with random numbers by calling the method
randomizerandomNums;
display the random numbers by calling the method
printitrandomNums;
reverse the array element order
reverserandomNums;
display the random numbers by calling the method
printitrandomNums reversed";
ask for two integers; inserted number and insert index
System.out.println
Please give me an integer value and an insert point between ;
int num scan.nextInt;
int index scan.nextInt;
insert the value in the index point by calling the method
insertValuerandomNums num, index;
display the final result
printitrandomNums final result";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
