Exercise 1: //The max function the max between a and b, it returns a if a == //b public double max(double a, double b); //The mult function returns the result of a * b public double mult(double a,...



Exercise 1:





  1. //The max function the max between a and b, it returns a if a == //b



public double max(double a, double b);







  1. //The mult function returns the result of a * b public double mult(double a, double b);








  1. //The exist in array function returns the index of the element //‘a’ if //‘a’ exist in array ‘arr’ otherwise returns ‘-1’ public int existsInArray(int [] arr, int a);








  1. //Are array equals method compares two arrays and returns true // if the elements of array ‘a’ are equal to elements of array




// ‘b’, element by element. If equals it returns 0, it returns -



// 1 if not



public int areArrayEquals(int [] a, int [] b);



Devise four executable test cases for every method in the JUnit notation. See the attached handout for a refresher on the notation.




Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here