|
|
@ -1,14 +1,18 @@ |
|
|
|
import java.io.BufferedInputStream; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.util.Scanner; |
|
|
|
|
|
|
|
public class PasswordManager implements PasswordManagerInterface { |
|
|
|
|
|
|
|
boolean running = true; |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
PasswordManager pm = new PasswordManager(); |
|
|
|
|
|
|
|
while (true) { |
|
|
|
while (pm.running) { |
|
|
|
InputStream inputStream = System.in; |
|
|
|
pm.showMenu(inputStream); |
|
|
|
} |
|
|
|
System.exit(0); |
|
|
|
} |
|
|
|
|
|
|
|
public PasswordManager() { |
|
|
@ -27,6 +31,20 @@ public class PasswordManager implements PasswordManagerInterface { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void showMenu(InputStream inputStream) { |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
Scanner scan = new Scanner(inputStream); |
|
|
|
|
|
|
|
sb.append("ciip Gruppe 8 - Password Manager\n\n"); |
|
|
|
|
|
|
|
sb.append("Menu:\n"); |
|
|
|
sb.append("- exit: e\n"); |
|
|
|
|
|
|
|
System.out.println(sb + "\n"); |
|
|
|
|
|
|
|
String input = scan.nextLine(); |
|
|
|
|
|
|
|
if (input.equals("e")) { |
|
|
|
running = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |