Question: Setup: Create a class called ConsolePractice with a main method. Create a static field in your class that stores a scanner object. You will use

 Setup: Create a class called ConsolePractice with a main method. Create
a static field in your class that stores a scanner object. You

Setup: Create a class called ConsolePractice with a main method. Create a static field in your class that stores a scanner object. You will use this scanner for all user input. o private static Scanner scanner new Scanner(System.in. Part A: Create a static method called "divide" Your method should do the following: Accept two integers as parameters, a numerator and denominator Compute the quotient and remainder of dividing the numerator by the denominator. Print the quotient and remainder to the Java console. Inside your main method, request two integers from the Java console and call your "divide' method. Part B: Create a static method called "compare'. Your method should do the following: Accept two arguments of type int. Use the following method header: o public static int comparelint first, int second) Your method should return the following values: o Return 0, when "first" and "second" are equal o Return -1, when "first" is less than "second" o Return 1, when "first is greater than "second" Inside your main method, request two integers from the Java console and pass them to your compare" method. Store the result of your method call and print it to the Java console

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!