starrynyt
01-20-2004, 09:49 PM
Please help, I am taking a Intro to Java class & I'm having trouble with my first assignment. I have it all done except for one bit of code.
**Write a JAVA Application that asks the user to input 2 non-negative integers, obtains the two integers from the user (using the JOptionPane class), and displays the sum, difference, and product of the numbers, all at the same time on one other JOptionPane window. Make sure the difference is always non-negative, without any assumptions, conditions, or restrictions on what the user enters, other than the numbers being non-negative. For example, if the user entered either 5 and 2, or 2 and 5, the difference would be reported as 3.
That's it, & it's the non-geative integer part I don't get. Perhaps I am overlooking it but I would appreciate any help! Thank you.
Samantha*
**Write a JAVA Application that asks the user to input 2 non-negative integers, obtains the two integers from the user (using the JOptionPane class), and displays the sum, difference, and product of the numbers, all at the same time on one other JOptionPane window. Make sure the difference is always non-negative, without any assumptions, conditions, or restrictions on what the user enters, other than the numbers being non-negative. For example, if the user entered either 5 and 2, or 2 and 5, the difference would be reported as 3.
That's it, & it's the non-geative integer part I don't get. Perhaps I am overlooking it but I would appreciate any help! Thank you.
Samantha*