I am getting an error saying NumberOperations can't be instantiated. Here is the code.
[LIST=1]
[*]public static void main(String[] args) {
[*] // TODO Auto-generated method stub
[*] // declare variables
[*] int num1, num2, sum, diff, product, average, absolute, max, min, adjusted1, adjusted2, adjustedSum;
[*] // Display Program Title and Directions
[*] ProgramDisplay.displayGreeting();
[*]
[*] int option = 0;
[*] do {
[*]
[*] // Collect User Input and Create NumberOperattions Object
[*] num1 = UserInput.getNum("Enter first integer number: ");
[*] num2 = UserInput.getNum("Enter second integer number: ");
[*] NumberOperations numOper = new NumberOperations(num1, num2);
[*] // Calculate Sum
[*] sum = numOper.calcSum();
[*] ProgramDisplay.displayResult("The sum of " + num1+ " and " + num2 + " is: ", sum);
[*] // Calculate Difference
[*] diff = numOper.calcDifference();
[*] ProgramDisplay.displayResult("The difference of " + num1+ " and " + num2 + " is: ", diff);
[*] // Calculate Product
[*] product = numOper.calcProduct();
[*] ProgramDisplay.displayResult("The product of " + num1+ " and " + num2 + " is: ", product);
[*] // Calculate Average
[*] average = numOper.calcAverage();
[*] ProgramDisplay.displayResult("The average of " + num1+ " and " + num2 + " is: ", average);
[*] NumberOperations NumberOper;
[*] // Calculate Absolute Value of Difference -- note that calcAbsolute is a static (class) method and is invoked using the class name
[*] absolute = NumberOper.calcAbsolute(diff);
[*] ProgramDisplay.displayResult("The absolute of " + diff + " is: ", absolute);
[*]
[*] // if both numbers are greater than 100, then subtract 100 from each.
[*] if (InputValidation.bothMoreThan100(num1, num2)) {
[*] adjusted1 = num1 - 100;
[*] adjusted2 = num2 - 100;
[*] ProgramDisplay.displayResult("The adjusted value of " + num1+ " is: ", adjusted1);
[*] ProgramDisplay.displayResult("The adjusted value of " + num2+ " is: ", adjusted2);
[*] }
[*] // if both numbers are negative, then add 200 to their sum.
[*] if (InputValidation.bothLessThanZero(num1, num2)) {
[*] adjustedSum = sum + 200;
[*] ProgramDisplay.displayResult("The adjusted sum is: ", adjustedSum);
[*] }
[*] } while (ProgramDisplay.terminateApplication());
[*] }
[*] }
[/LIST]