public class MoneyDemo
1:
2: public class MoneyDemo
3: {
4: public static void main(String[] args)
5: {
6: Money start = new Money( );
7: Money goal = new Money( );
8: System.out.println("Enter your current savings:");
9: start.readInput( );
10: goal = start.times(2);
11: System.out.print(
12: "If you double that, you will have ");
13: goal.writeOutput( );
14: System.out.println(", or better yet:");
15: goal = start.add(goal);
16: System.out.println(
17: "If you triple that original amount, you will have:");
18: goal.writeOutput( );
19: System.out.println( );
20: System.out.println("Remember: A penny saved");
21: System.out.println("is a penny earned.");
22: }
23: }