The Hound of the Wolf

For the strength of Pack is in the Wolf, and the strength of Wolf is in the Pack -Rudyard Kipling

Monday, April 06, 2009

Java NCC Programming: Exercise 2

Exercise 2
Due on April 12 2009, 12NN

Problem: Create a java program that will ask two numbers of type integer. Use JOptionPane. Compute for:

a. Sum
b. Difference
c. Product (type double)
d. Quotient (type double)
e. Modulo
f. Highest between the two integers


Your output should be (using JOptionPane):

First Number: <1st>
Second Number: <2nd>
Sum: <1st> + <2nd>
Difference: <1st> - <2nd>
Product: <1st> * <2nd>
Quotient: <1st> / <2nd>
Module: <1st> % <2nd>
Highest between the two:


Submit your answer with lastname_java_exercise2 as the email's subject. I will just be running the java file and will grade if the output has been achieved. So, please check if it works before submitting it. Plus 5 points in the next graded exercise for those who can get the correct output.