|
@@ -49,42 +49,9 @@ public class SciCalc
|
49
|
49
|
|
50
|
50
|
}
|
51
|
51
|
|
52
|
|
- /**
|
53
|
|
- * Store 1 numeric value in memory for recall later
|
54
|
|
- * M+ = add currently displayed value to the value in memorie (default = 0)
|
55
|
|
- * MC = reset memory
|
56
|
|
- * MRC = recall current valie from memory to display
|
57
|
|
- */
|
58
|
|
- public void memory()
|
59
|
|
- {
|
60
|
|
- // Memory menu
|
61
|
|
- Console.println("Memory Mode");
|
62
|
|
- // Ask for input of a number
|
63
|
|
- double memoryInput = Console.getDoubleInput("Enter a number to store. ");
|
64
|
|
- // Display memory keys
|
65
|
|
- Console.println("Memory Options: "
|
66
|
|
- + "\nM+ : adds input to memory"
|
67
|
|
- + "\nMC : clears current memory"
|
68
|
|
- + "\nMRC : displays current memory input");
|
69
|
|
-
|
70
|
|
- String memorySelect = Console.getStringInput("What would you like to do? (Enter the key)");
|
71
|
|
-
|
72
|
|
-
|
73
|
|
- if (memorySelect.equals("M+") == true) {
|
74
|
|
- // M+
|
75
|
|
- memory = memoryInput;
|
76
|
|
-
|
77
|
|
- } else if (memorySelect.equals("MC") == true) {
|
78
|
|
- // MC
|
79
|
|
- memory = 0;
|
80
|
|
-
|
81
|
|
- } else if (memorySelect.equals("MCR") == true) {
|
82
|
|
- // MCR
|
83
|
|
- Console.println(Double.toString(memory));
|
84
|
|
-
|
85
|
|
- }
|
86
|
|
-
|
87
|
|
- }
|
|
52
|
+ public void toMemory() {
|
|
53
|
+ MemoryFunc memoryMenu = new MemoryFunc();
|
|
54
|
+ }
|
88
|
55
|
|
89
|
56
|
|
90
|
57
|
/**
|