Question: esfay/Downloads/CS200-1-HW5.pdf Part 5a: Create a Java class named YourName5a. Create a main() method, and add another method named howManyEnteredBeforeseenboth(). This method takes two integer arguments
esfay/Downloads/CS200-1-HW5.pdf Part 5a: Create a Java class named YourName5a. Create a main() method, and add another method named howManyEnteredBeforeseenboth(). This method takes two integer arguments a and b. The method prompts the user to enter integers, one at a time, until a and b have both been entered. Data entry stops once both values have been entered. The method then prints to the console window the number of integers entered. For example, if a were 25 and b were 17, here are two sample runs of the method: Enter an int: 948 Enter an int: 49 Enter an int: 17 Enter an int: 0 Enter an int: 25 Enter an int: 6 Enter an int: 25 Enter an int: i0 Enter an int: 25 Enter an int: 25 Enter an int: 109 Enter an int: 25 Enter an int: 17 You had to enter 5 integers Before typing both 17 and 25 You had to enter 8 integers Before typing both 17 and 25. The method signature is as follows: public static void howManyEnteredBeforeseenBoth( int a, int b )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
