Question: Need help with Java please! The software should prompt the user to enter decimal (base-10) values to convert. The software should continue prompting the
Need help with Java please!
" The software should prompt the user to enter decimal (base-10) values to convert. The software should continue prompting the user for values until the user enters a -1, indicating the user wishes to quit the software. The software should re-prompt the user if the user enters a decimal (base-10) value that is negative (note: be careful with the logic here because -1 is used as a sentinel), or if the user enters a value that is not an integer."

Example program execution: > TERMINAL This program converts nonnegative decimal (base-10) numbers (integers) to their binary (base-2) equivalent until the user types -1 to quit Enter a number (-1 to quit): 2 Decimal (base-10): 2, Binary (base-2): 10 Enter a number (-1 to quit): 4 Decimal (base-10): 4, Binary Cbase-2): 100 Enter a number (-1 to quit): 11 Decimal (base-10): 11, Binary Cbase-2): 1011 Enter a number (-1 to quit): abc Not an integer, try again Enter a number (-1 to quit): -10 Need a nonnegative number or -1 to quit Enter a number (-1 to quit): -1 Exiting DecimalToBinary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
