Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

import java.Random; import java.Scanner; public class Flores_Module_7_reverseDigits { //main function for program public static void main(String...

Hello again. I am hoping you can help me with 2 problems. I will send the second separately. Here are the requirements for the first problem:Write a method, reverseDigit, that takes an integer as a parameter and returns the number with its digits reversed. For example, the value of reverseDigit(12345) is 54321. Also, write a program to test your method. This program must also account for a negative number so that if -1234 is entered program returns -4321. Additionally, the negative number cannot be stripped from the input and added back in - for example this pseudo code:reverseNum = -reverseNum;return reverseNum;I have all of this solved except for the negative return. When I input a negative number I get a 0 returned. Attached is my code thus far. Please correct to account for a negative number. Also, can you please evaluate my comments add comments where ever applicable to explain your solution and where I might have something wrong or missing?

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question