Ver código fonte

Updated Main Menu

Trinh Tong 6 anos atrás
pai
commit
2a95b38180
2 arquivos alterados com 29 adições e 34 exclusões
  1. 5
    13
      MainMenu.java
  2. 24
    21
      package.bluej

+ 5
- 13
MainMenu.java Ver arquivo

@@ -16,25 +16,17 @@
16 16
  */
17 17
 public class MainMenu
18 18
 {
19
-    // instance variables - replace the example below with your own
20
-    private int x;
21
-
22
-    /**
23
-     * Constructor for objects of class MainMenu
24
-     */
25
-    public MainMenu()
26
-    {
27
-        // initialise instance variables
28
-        x = 0;
29
-    }
30
-
31 19
     /**
32 20
      * Method to display the main menu
33 21
      */
34 22
     
35 23
     public void mainMenuDisplay()
36 24
     {
37
-        // put your code here
25
+        Console.println("Calculator Options:"
26
+                         + "\n1: Basic Calculator (+ - * /)"
27
+                         + "\n2: Advanced Calculator (Exponential Functions)"
28
+                         + "\n3: Scientific Functions (Base Conversion, Memory, Trigonometry)"
29
+                         + "\n4: Exit the calculator");
38 30
         
39 31
     }
40 32
 }

+ 24
- 21
package.bluej Ver arquivo

@@ -1,37 +1,40 @@
1 1
 #BlueJ package file
2
-dependency1.from=MainApplication
3
-dependency1.to=Console
2
+dependency1.from=SciCalc
3
+dependency1.to=SwitchDisplay
4 4
 dependency1.type=UsesDependency
5 5
 dependency2.from=SciCalc
6
-dependency2.to=SwitchDisplay
6
+dependency2.to=Trig
7 7
 dependency2.type=UsesDependency
8
-dependency3.from=SciCalc
9
-dependency3.to=MemoryFunc
8
+dependency3.from=SwitchDisplay
9
+dependency3.to=Console
10 10
 dependency3.type=UsesDependency
11
-dependency4.from=SciCalc
12
-dependency4.to=Trig
11
+dependency4.from=MainApplication
12
+dependency4.to=MemoryFunc
13 13
 dependency4.type=UsesDependency
14
-dependency5.from=MemoryFunc
14
+dependency5.from=MainApplication
15 15
 dependency5.to=Console
16 16
 dependency5.type=UsesDependency
17
-dependency6.from=SwitchDisplay
17
+dependency6.from=MemoryFunc
18 18
 dependency6.to=Console
19 19
 dependency6.type=UsesDependency
20
+dependency7.from=MainMenu
21
+dependency7.to=Console
22
+dependency7.type=UsesDependency
20 23
 editor.fx.0.height=722
21 24
 editor.fx.0.width=1120
22 25
 editor.fx.0.x=320
23
-editor.fx.0.y=140
26
+editor.fx.0.y=119
24 27
 objectbench.height=214
25 28
 objectbench.width=595
26 29
 package.divider.horizontal=0.6
27 30
 package.divider.vertical=0.6847360912981455
28 31
 package.editor.height=473
29
-package.editor.width=477
32
+package.editor.width=493
30 33
 package.editor.x=35
31
-package.editor.y=60
34
+package.editor.y=59
32 35
 package.frame.height=759
33 36
 package.frame.width=619
34
-package.numDependencies=6
37
+package.numDependencies=7
35 38
 package.numTargets=8
36 39
 package.showExtends=true
37 40
 package.showUses=true
@@ -56,19 +59,19 @@ target2.width=80
56 59
 target2.x=10
57 60
 target2.y=280
58 61
 target3.height=50
59
-target3.name=MemoryFunc
62
+target3.name=Console
60 63
 target3.showInterface=false
61 64
 target3.type=ClassTarget
62
-target3.width=110
63
-target3.x=150
64
-target3.y=410
65
+target3.width=80
66
+target3.x=70
67
+target3.y=170
65 68
 target4.height=50
66
-target4.name=Console
69
+target4.name=MemoryFunc
67 70
 target4.showInterface=false
68 71
 target4.type=ClassTarget
69
-target4.width=80
70
-target4.x=70
71
-target4.y=170
72
+target4.width=110
73
+target4.x=210
74
+target4.y=350
72 75
 target5.height=50
73 76
 target5.name=Trig
74 77
 target5.showInterface=false