summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/java1/aufgabe5/Konto.java
blob: 3d3aed5bd898ba624161e8d7975d878e88d0bf71 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
 * 
 */
package de.fhswf.in.inf.java1.aufgabe5;

import java.math.BigDecimal;

/**
 * TODO Add comment here
 *
 * @author $Author: $
 * @version $Revision: $, $Date: $ UTC
 */
public class Konto
{

   private BigDecimal guthaben;

   private BigDecimal dispo;

   private Person besitzer;

   /**
    * TODO Add constructor comment here
    *
    * @param besitzer
    *           Owner of the account
    * @param dispo
    *           Dispo of the account
    * @param guthaben
    *           Initial balance of the account
    */
   public Konto(Person besitzer, BigDecimal dispo, BigDecimal guthaben)
   {

      if (besitzer == null)
      {
         throw new IllegalArgumentException("Besitzer can't be null");
      }
      if (dispo == null)
      {
         throw new IllegalArgumentException("Dispo can't be null");
      }
      if (guthaben == null)
      {
         throw new IllegalArgumentException("Guthaben can't be null");
      }

      this.besitzer = besitzer;
      this.dispo = dispo;
      this.guthaben = guthaben;

   }

   /**
    * TODO Add method comment here
    *
    * @param betrag
    */
   public void abheben(BigDecimal betrag)
   {

   }

   /**
    * TODO Add method comment here
    *
    * @param betrag
    */
   public void einzahlen(BigDecimal betrag)
   {

   }

}