Please follow the format to reply to this question. Thank you. // SumAndProduct.java - This program computes sums and products. // Input: Interactive. // Output: Computed sum and product. import javax.swing.*; public class SumAndProduct { public static void main(String args[]) { int number; String numberString; numberString = JOptionPane.showInputDialog(\"Enter a positive integer or 0 to quit: \"); number = Integer.parseInt(numberString); while(number != 0) { // call sums() method here // call products() method here numberString = JOptionPane.showInputDialog(\"Enter a positive integer or 0 to quit: \"); number = Integer.parseInt(numberString); } System.exit(0); } // End of main() method. Solution Here I have been asked to read a single value and to find the sum and it\'s product so I have done as deoubling the ginven value as it is the one value I am reading. package sumandproduct; import javax.swing.*; public class SumAndProduct { public static void main(String args[]) { int number; String numberString; numberString = JOptionPane.showInputDialog(\"Enter a positive integer or 0 to quit: \"); number = Integer.parseInt(numberString); while(number != 0) { // call sums() method here sum(number); product(number); // call products() method here numberString = JOptionPane.showInputDialog(\"Enter a positive integer or 0 to quit: \"); number = Integer.parseInt(numberString); } System.exit(0); } // End of main() method. public static void sum(int a){ System.out.println(\"The sum of the given number as double is = \"+(a+a)); } public static void product(int a){ System.out.println(\"The product of the given number as it\'s square is = \"+(a*a)); } } .