Browse Source

started main method

Connor Dunnigan 6 years ago
parent
commit
eceec301b1
1 changed files with 43 additions and 0 deletions
  1. 43
    0
      SciCalculator.java

+ 43
- 0
SciCalculator.java View File

@@ -0,0 +1,43 @@
1
+import java.util.Scanner;
2
+import java.lang.*;
3
+
4
+public class SciCalculator{
5
+
6
+  public static void main(String[] args){
7
+
8
+    Scanner stdin = new Scanner(System.in);
9
+
10
+    boolean isOn = true;
11
+    int choice;
12
+
13
+    while(isOn){
14
+        //display prompt
15
+      System.out.println("Please choose a function (enter # 1-4)");
16
+      System.out.println("(1) Change units");
17
+      System.out.println("(2) Change number system");
18
+      System.out.println("(3) Access memory functions (M+, MC, MRC)");
19
+      System.out.println("(4) Execute calculation");
20
+      System.out.println("(5) Clear display");
21
+      System.out.println("-----------------");
22
+      System.out.println("(6)Quit program");
23
+
24
+      choice = stdin.nextInt();
25
+
26
+      switch(choice){
27
+        case 1:System.out.println("call change units function");//call change units function
28
+                break;
29
+        case 2:System.out.println("call number system function");//call number system function
30
+                break;
31
+        case 3:System.out.println("call memory function");//call memory function
32
+                break;
33
+        case 4:System.out.println("call operations function");//call operations function
34
+                break;
35
+        case 5:System.out.println("clear display");//clear display
36
+                break;
37
+        case 6:System.out.println("Goodbye");//clear display
38
+                isOn = false;
39
+                break;
40
+      }
41
+    }
42
+  }
43
+}