blob: d90c447fe8b09a785d720f3eec75582ec480a6f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/**
*
*/
package de.fhswf.in.inf.java1.aufgabe05;
import java.math.BigDecimal;
/**
* Package for main function.
*
* @author $Author: $
* @version $Revision: $, $Date: $ UTC
*/
public final class Bank
{
/**
* Prevents instantiation of the unity class Bank.
*
*/
private Bank()
{
}
/**
* Main function for testing the Bank system.
*
* @param args
* Shell arguments
*/
public static void main(String[] args)
{
Person dieter = new Person("Dieter", "Hallowegers");
Konto giro = new Konto(dieter, new BigDecimal(100));
try
{
giro.einzahlen(new BigDecimal(100));
giro.abheben(new BigDecimal(200));
System.out.println(giro.getKontostand());
giro.abheben(new BigDecimal(1));
}
catch (IllegalArgumentException e)
{
System.out.println(e);
}
}
}
|