61 lines
1.3 KiB
Java
61 lines
1.3 KiB
Java
public class Display {
|
|
|
|
private String message;
|
|
public String getMesssage() {
|
|
return message;
|
|
}
|
|
|
|
public Display() {
|
|
// TODO - implement Display.Display
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param message
|
|
*/
|
|
public void display(String message) {
|
|
this.message = message;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param prompt
|
|
*/
|
|
public int readPIN(String prompt) {
|
|
// TODO - implement Display.readPIN
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param prompt
|
|
* @param menu
|
|
*/
|
|
public int readMenuChoice(String prompt, String[] menu) {
|
|
// TODO - implement Display.readMenuChoice
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param prompt
|
|
*/
|
|
public Money readAmount(String prompt) {
|
|
// TODO - implement Display.readAmount
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public static String get_default_display() {
|
|
StringBuilder sb = new StringBuilder(); // Use StringBuilder for efficiency
|
|
sb.append("------------------------------------\n");
|
|
sb.append("Welcome to the ATM\n");
|
|
sb.append("1. Check Balance\n");
|
|
sb.append("2. Withdraw Cash\n");
|
|
sb.append("3. Deposit Cash\n");
|
|
sb.append("------------------------------------\n");
|
|
return sb.toString();
|
|
}
|
|
|
|
}
|