Question
the program will start the menu calling the method extractLargestAndSmallestYourName(), which is specified as below. The method extractLargestAndSmallestYourName() will receive 2 array of integers as
the program will start the menu calling the method extractLargestAndSmallestYourName(), which is specified as below.
The method extractLargestAndSmallestYourName() will receive 2 array of integers as arguments, which are denoted as array number 1 and array number 2.
The method will then search for the largest value and the smallest value. The search will also track from which array(s) these values can be found; and
The information will be return an array, which has the two (2) groups of data as follows,
1) The first group involves the largest value and from which array(s) and has the following structure (see the sample output for details):
largestValue numberOfArrayWithLargestValue {listOfArray}
2) The second group involves the smallest value and from which array(s) and has the following structure (see the sample output for details):
smallestValue numberOfArrayWithSmallestValue {listOfArray}
***************************************************
* MENU *
* (1) Calling extractLargestAndSmallestYourName() *
* (2) Quit *
***************************************************
Enter your option (1 or 2): 1
Building the first array
Enter the array size: 5
Enter the array element values
Index 0: -15
Index 1: 450
Index 2: 63
Index 3: -9
Index 4: 90
Building the second array
Enter the array size: 6
Enter the array element values
Index 0: 100
Index 1: -151
Index 2: 450
Index 3: 6
Index 4: -91
Index 5: 9
Calling extractLargestAndSmallestYourName() --
After finishing the call, the returning array
450 2 1 2 -151 1 2
***************************************************
* MENU *
* (1) Calling extractLargestAndSmallestYourName() *
* (2) Quit *
***************************************************
Enter your option (1 or 2): 1
Building the first array
Enter the array size: 7
Enter the array element values
Index 0: 15
Index 1: 450
Index 2: 63
Index 3: -900
Index 4: 90
Index 5: -900
Index 6: 90
Building the second array
Enter the array size: 6
Enter the array element values
Index 0: 100
Index 1: -151
Index 2: 4500
Index 3: 6
Index 4: -91
Index 5: 9
Calling extractLargestAndSmallestYourName() --
After finishing the call, the returning array
4500 1 2 -900 1 1
***************************************************
* MENU *
* (1) Calling extractLargestAndSmallestYourName() * CIS36 Java Programming; Homework #2 Page 5 of 5
* (2) Quit *
***************************************************
Enter your option (1 or 2): 1
Working Good!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started