Array activities - name your class ArrayActivities

 

  1. In constructor, create a global array with 10 ints filled with 10 random values from 1-100.
  2. Create a method called printNums that will print out all nums
  3. Create a method called findAvg that will return the average
  4. Create a method called findLowest that will return the lowest score
  5. Create a method called findFixedAvg that will return the average without the lowest score (use findLowest)
  6. Create a method called findValue that will take in an int and search for it in the array. If it is there it will return the index number, otherwise it will return -1.
  7. Create a method called add5ToAll that will update nums by adding 5 to all values in it . Like if the value was 11, it would be 15.
  8. For those who are advanced - create a method sort - that will fix scores so that it is sorted. You will need to use another array temp with 2 for loops probably. Try doing it w/o api sort.
  9. For advanced (most of you): Create a method called public int[] findAllIndexes (int x) that will return the all indexes that have value x.
  10. EC Create a method called changeToBinary that will turn each number into its binary
  11. EC Create a method called changeToDecimal that will turn the number back to base 10.