Ultra Geile Studenten Benutzer Oberfläche (UGSBO)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
609 B

package ugsbo.com.buchhaltung;
import com.google.gson.*;
public class Blockchain {
Block Workingobjekt;
public Blockchain() {
Workingobjekt = new Block(0);
}
public void add(int eingabe) {
Block newWorkingobjekt = new Block(eingabe, Workingobjekt, Workingobjekt.getHash(), Workingobjekt.getKontostand());
Workingobjekt = newWorkingobjekt;
}
public int kontostand() {
return Workingobjekt.getKontostand();
}
public String toString() {
String JSON = new GsonBuilder().setPrettyPrinting().create().toJson(Workingobjekt);
return JSON;
}
}