Person Contracts and Default Values

Added Interace for Persons and Contracts.
Used methods with default values for changing Estates or EstateAgents.
This commit is contained in:
Togepy95
2017-04-19 15:28:54 +02:00
parent 8ecc87fa4b
commit 9a8d38a0c7
7 changed files with 294 additions and 26 deletions

View File

@ -51,6 +51,18 @@ class FormUtil {
password = String.valueOf(System.console().readPassword());
return password;
}
/**
* Reads a password from the console.
*
* @return the entered password
*/
static String readPassword(String oldPassword) {
String password;
System.out.print("Password: ");
password = String.valueOf(System.console().readPassword());
if(password.equals(""))return oldPassword;
return password;
}
/**
* Reads an integer from the console.