1. Engineering
  2. Computer Science
  3. please help me solve the questionsthanks...

Question: please help me solve the questionsthanks...

Question details
Please help me solve the questions!thanks!
Question 2: 20 points Given this Java code, complete the four methods (5 points each): public class CSE105Exam public static void main(Stringl) args)( doublel] numbers new double[50] fillArrayRandom(numbers); System.out.println(Array contents: ) printArray(numbers); System.out.println(The smallest number is:+findMin(numbers)); printSortedArray(numbers); //fill the array with random doubles between 0 an 30. //use Math.randomO which gives a double between 0 and1 public static void fillArray(double toFill) //missing code (a) //print the contents of the array to the console, showing the index and value of //each element on a new line public static void printArray(doublell toPrint) //missing code (b)
//return the minimum value of the array public static double findMin(doublel myArray)t //missing code (c) //sort the array and print the ascending values public static void printSortedArray(double[] toSort) //missing code (d)
Define a data class to keep track of pets. It must have instance variables for name, animal type(dog, cat etc), food (what it eats), and a unique IDNumber. The instance variables should be initialised in the constructor. Complete this data class with a constructor, getters and setters. Override the toString0 method. 20 points public class Pet
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution