import java.util.Scanner; public class MoneyDemo { public static void main (String[] args) { Scanner keyboard = new Scanner(System.in); Money aDemo = new Money(); String function; aDemo.readInput(); System.out.println("If you would like to add your two sums together, " + "press the A key."); System.out.println("If you would like to subtract the second value " + "entered from the first, press the S key."); function = keyboard.next(); if (function.equalsIgnoreCase("a")) { aDemo.addMoney(); } else if (function.equalsIgnoreCase("s")) { aDemo.subtractMoney(); } else System.out.println("Invalid input."); } }