email me at borlaj@portlandschools.org

 Array Activities in HWJ12_Arrays   In a method public void practiceArrayInts() do the following: Print out all the numbers in the array. Find the sum of all the numbers in the array and print that out.//use a for loop Add 7 to every number in the array. //use a for loop [advanced] Replace all values with random ints numbers between 1 and 100 and print it out [super adv] Sort the array In a method public void practiceArrayStrings() do the following: ( Have it print out every name on its own line. Have it print out the length of each name ( ie Jeff -> 4 letters [advanced]Have it say which word comes first alphabetically (use compareTo) [hard, extra credit) [advanced] Have it reorder the words alphabetically   Start with the code below: ```/** * HWJ15_Arrays - basic practice of Arrays * * @author (your name) * @version 1.17 */ public class HWJ12_Arrays { //I put the word static so that we can run this easily in bluej static int[] nums={10,20,30,40,50,60,70,80,90,100}; static String[] names={"Larsen","Robert","Abukar"}; //Print out all the numbers in the array. public static void classroomPlay() { } //Print out all the numbers in the array. public static void printArray() { } //Find the sum of all the numbers in the array and print that out. public static void printSum() { } //Add 7 to every number in the array. //YOU HAVE TO USE A FOR LOOP ( NOT FOR EACH) public static void add7ToAll() { } //Replace all values with random ints numbers between 1 and 100 and print it out //YOU HAVE TO USE A FOR LOOP ( NOT FOR EACH) public static void replaceWithRandom() { } //advanced Sort the array public static void sortIt() { } //Now Strings; Create an array with 3 names. //Have it print out every name on its own line. public static void printNames() { } //Have it print out the length of each name public static void printNameLengths() { } //[advanced]Have it say which word comes first alphabetically (use compareTo) public String findFirstName() { return null; } //advanced - sort the names public void sortNames() { } public int findRandom (int start, int end) { int multiplier = end-start+1; int random = (int) (Math.random()*multiplier)+start; return random; } } ```