Trinh Tong před 6 roky
rodič
revize
2a95b38180
2 změnil soubory, kde provedl 29 přidání a 34 odebrání
  1. 5
    13
      MainMenu.java
  2. 24
    21
      package.bluej

+ 5
- 13
MainMenu.java Zobrazit soubor

16
  */
16
  */
17
 public class MainMenu
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
      * Method to display the main menu
20
      * Method to display the main menu
33
      */
21
      */
34
     
22
     
35
     public void mainMenuDisplay()
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 Zobrazit soubor

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