|
@ -2,23 +2,31 @@ package ugsbo.com.buchhaltung; |
|
|
|
|
|
|
|
|
public class Blockchain { |
|
|
public class Blockchain { |
|
|
|
|
|
|
|
|
Block erster; |
|
|
|
|
|
|
|
|
Block Workingobjekt; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Blockchain() { |
|
|
public Blockchain() { |
|
|
erster = new Block(0); |
|
|
|
|
|
|
|
|
Workingobjekt = new Block(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void add(int eingabe) { |
|
|
public void add(int eingabe) { |
|
|
// TODO Auto-generated method stub |
|
|
// TODO Auto-generated method stub |
|
|
|
|
|
Block newWorkingobjekt = new Block(eingabe, Workingobjekt, Workingobjekt.getHash(), Workingobjekt.getKontostand()); |
|
|
|
|
|
|
|
|
|
|
|
Workingobjekt = newWorkingobjekt; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int kontostand() { |
|
|
public int kontostand() { |
|
|
// TODO Auto-generated method stub |
|
|
// TODO Auto-generated method stub |
|
|
return 0; |
|
|
|
|
|
|
|
|
return Workingobjekt.getKontostand(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String toString() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|