1234567891011121314151617181920212223242526272829303132333435363738 |
-
- /**
- * Write a description of class Display here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class Display
- {
- private String displayValue;
-
- public String getDisplay() {
- return displayValue;
- }
-
- public void setDisplay(String prompt) {
- displayValue = prompt;
- }
-
- public void resetDisplay(String prompt) {
- displayValue = "0";
- }
-
- public void errorDisplay() {
- int Error = 1;
- while (Error == 1){
- String command = Console.getStringInput("ERROR. Please clear the display");
- if (command.equalsIgnoreCase("c") || command.equalsIgnoreCase("clear")) {
- Error = 0;
- setDisplay("0");
- Console.println(getDisplay());
- String resetValue = Console.getStringInput("Enter number");
- setDisplay(resetValue);
- }
- }
- }
- }
|