Quellcode durchsuchen

Merge branch 'master' of https://git.zipcode.rocks/jonathan-hinds/ZCW-MacroLabs-OOP-ScientificCalculator

Elliott Stansbury vor 6 Jahren
Ursprung
Commit
6a6eb98038
1 geänderte Dateien mit 16 neuen und 24 gelöschten Zeilen
  1. 16
    24
      Calculations.java

+ 16
- 24
Calculations.java Datei anzeigen

78
         //return result;
78
         //return result;
79
     }
79
     }
80
     
80
     
81
+    public static ArrayList<Double> getNumbers(String userInput){
82
+        ArrayList<Double> results = new ArrayList<Double>();
83
+        //takes in a string
84
+        //finds the first occurence of a number
85
+        //store it as a double ( left )
86
+        //add this to the arraylist
87
+        //find the second occurence of a number
88
+        //store it as a double (right)
89
+        //add this to the array list
90
+        //if the size of the arraylist is 2
91
+            //return the array list
92
+        //else return null
93
+        return results;
94
+    }
95
+    
81
     public static String Multiply(String userInput)
96
     public static String Multiply(String userInput)
82
     {
97
     {
83
-        //take in a string
84
-        //take the numbers out of the string
85
-        //convert them to doubles
86
         //perform the operation
98
         //perform the operation
87
         //convert to string
99
         //convert to string
88
         //return string
100
         //return string
91
 
103
 
92
     public static String Divide(String userInput)
104
     public static String Divide(String userInput)
93
     {
105
     {
94
-        //take in a string
95
-        //take the numbers out of the string
96
-        //convert them to doubles
97
         //perform the operation
106
         //perform the operation
98
         //convert to string
107
         //convert to string
99
         //return string
108
         //return string
102
 
111
 
103
         public static String Add(String userInput)
112
         public static String Add(String userInput)
104
     {
113
     {
105
-        //take in a string
106
-        //take the numbers out of the string
107
-        //convert them to doubles
108
         //perform the operation
114
         //perform the operation
109
         //convert to string
115
         //convert to string
110
         //return string
116
         //return string
113
     
119
     
114
     public static String Subtract(String userInput)
120
     public static String Subtract(String userInput)
115
     {
121
     {
116
-        //take in a string
117
-        //take the numbers out of the string
118
-        //convert them to doubles
119
         //perform the operation
122
         //perform the operation
120
         //convert to string
123
         //convert to string
121
         //return string
124
         //return string
124
  
127
  
125
     public static String InvertSign(String userInput)
128
     public static String InvertSign(String userInput)
126
     {
129
     {
127
-        //take in a string
128
-        //take the numbers out of the string
129
-        //convert them to doubles
130
         //perform the operation
130
         //perform the operation
131
         //convert to string
131
         //convert to string
132
         //return string
132
         //return string
135
     
135
     
136
     public static String InvertNumber(String userInput)
136
     public static String InvertNumber(String userInput)
137
     {
137
     {
138
-        //take in a string
139
-        //take the numbers out of the string
140
-        //convert them to doubles
141
         //perform the operation
138
         //perform the operation
142
         //convert to string
139
         //convert to string
143
         //return string
140
         //return string
146
 
143
 
147
     public static void Clear()
144
     public static void Clear()
148
     {
145
     {
149
-        //take in a string
150
-        //take the numbers out of the string
151
-        //convert them to doubles
152
-        //perform the operation
153
-        //convert to string
154
-        //return string
146
+        //reset the default value to 0
155
     }
147
     }
156
 }
148
 }