blob: 4d1673f460a5f4fa9072180e0a3821f60da9cc61 (
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
|
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
public class Eingabe extends Thread {
private Personal personal;
public Eingabe(Personal personal) {
this.personal = personal;
}
@Override
public void run() {
boolean weiter = true;
while (weiter) {
synchronized(this.personal) {
try {
var inputStream = new InputStreamReader(System.in);
var bufferedReader = new BufferedReader(inputStream);
this.personal.eingabe();
System.out.println("Weitere Berechnung durchführen (j/n)?");
weiter = bufferedReader.readLine().equals("j");
} catch (IOException exception) {
}
}
}
}
}
|