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 co-worker 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:
*21412589368057649175
* Here are the numbers in the array reversed:
*75916457803689254121
* Please give me an integer value and an insert point between 0-9
*2
*3
*
* Here are the numbers in the array final result:
*7591642578036892541
*/
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 9th index will fall off)
public static void insertValue(int array[], int num, int index){
}
//reverse the order of the elements
public static void reverse(int rev[]){
}
//print the array
public static void printit(int x[], String s){
}
//randomize() method will fill in elements with random numbers from 10-99
public static void randomize(int 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 main(String[] args){
Scanner scan = new Scanner(System.in);
int [] randomNums = new int [10];
//populate with random numbers by calling the method
randomize(randomNums);
//display the random numbers by calling the method
printit(randomNums,"");
//reverse the array element order
reverse(randomNums);
//display the random numbers by calling the method
printit(randomNums," reversed");
//ask for two integers; inserted number and insert index
System.out.println("
Please give me an integer value and an insert point between 0-9");
int num = scan.nextInt();
int index = scan.nextInt();
//insert the value in the index point by calling the method
insertValue(randomNums, num, index);
//display the final result
printit(randomNums," final result");
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!