Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Please help me solve the questions!thanks! image text in transcribed
image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago