Question: Java program that contains the main method that has calls to each method to show that each works. Upload your .java file and the output
Java program that contains the main method that has calls to each method to show that each works. Upload your .java file and the output of executing each of the methods to show that they work. The signature includes the method name, the return type, and the number of parameters and their types.
int [] returnSet(int [] array)
This method returns a new array containing the unique values from an array of integers. For example, if you pass the array is [3, 2, 3, 8, 3, 4, 6, 7, 8, 9], your method will return a new array containing the values (2, 3, 4, 6, 7, 8, 9) but the order does not matter.
int mode(int [] array)
This method returns the value that appears most frequently in an array.
int antiMode(int [] array)
This method returns the value that appears least frequently in an array.
int longestEqualSequence(int [] array)
This method returns the length of the longest sequence of numbers that are equal. For example, in [6, 7, 4, 4, 8, 7, 1, 3, 3, 4, 1, 4, 4, 4, 2, 9, 1, 8, 2, 7], the longest sequence is length three: 4, 4, 4
int biggestHill(int [] array)
This method returns the length of the longest sequence of numbers that are strictly increasing in value (> not >=). For example, in [6, 6, 4, 2, 9, 7, 4, 7, 2, 6, 5, 7, 5, 2, 4, 6, 9, 7, 5, 3], the longest sequence is length four: 2, 4, 6, 9
boolean mirrorImage(String s)
This method determines whether the String s is spelled the same forward and backward. For example, radar, mom, and abba are the same forward and backward.
int [] reverse(int [] a)
This method returns the address of an array that contains the same values as a but in reverse order.
boolean increasing(int [] array)
This method returns true if the values in the array are in increasing order (>=).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
