Parcourir la source

cast to int for factorial in main

Demetrius Murray il y a 6 ans
Parent
révision
0172facbec
2 fichiers modifiés avec 18 ajouts et 18 suppressions
  1. 1
    1
      MainApplication.java
  2. 17
    17
      package.bluej

+ 1
- 1
MainApplication.java Voir le fichier

@@ -163,7 +163,7 @@ public class MainApplication {
163 163
                      * Below are method calls to the Bonus class
164 164
                      */
165 165
                     case 'b':
166
-                    currentNum = bonus.factorial(currentNum);
166
+                    currentNum = bonus.factorial((int) currentNum);
167 167
                     default:
168 168
                     Console.errorOperator();
169 169
                 }

+ 17
- 17
package.bluej Voir le fichier

@@ -11,20 +11,20 @@ dependency3.type=UsesDependency
11 11
 dependency4.from=MainApplication
12 12
 dependency4.to=Console
13 13
 dependency4.type=UsesDependency
14
-editor.fx.0.height=1057
15
-editor.fx.0.width=1920
16
-editor.fx.0.x=-240
17
-editor.fx.0.y=-1057
18
-objectbench.height=198
19
-objectbench.width=683
20
-package.divider.horizontal=0.5476190476190477
21
-package.divider.vertical=0.685099846390169
22
-package.editor.height=439
23
-package.editor.width=1154
24
-package.editor.x=0
25
-package.editor.y=23
26
-package.frame.height=709
27
-package.frame.width=1280
14
+editor.fx.0.height=864
15
+editor.fx.0.width=1330
16
+editor.fx.0.x=353
17
+editor.fx.0.y=-930
18
+objectbench.height=93
19
+objectbench.width=1160
20
+package.divider.horizontal=0.5989473684210527
21
+package.divider.vertical=0.8620689655172413
22
+package.editor.height=618
23
+package.editor.width=1058
24
+package.editor.x=-207
25
+package.editor.y=-938
26
+package.frame.height=783
27
+package.frame.width=1184
28 28
 package.numDependencies=4
29 29
 package.numTargets=5
30 30
 package.showExtends=true
@@ -39,7 +39,7 @@ target1.height=50
39 39
 target1.name=CalculatorTest
40 40
 target1.showInterface=false
41 41
 target1.type=UnitTestTargetJunit4
42
-target1.width=110
42
+target1.width=90
43 43
 target1.x=290
44 44
 target1.y=70
45 45
 target2.association=CalculatorTest
@@ -47,7 +47,7 @@ target2.height=50
47 47
 target2.name=Calculator
48 48
 target2.showInterface=false
49 49
 target2.type=ClassTarget
50
-target2.width=110
50
+target2.width=90
51 51
 target2.x=260
52 52
 target2.y=100
53 53
 target3.association=ConsoleTest
@@ -62,7 +62,7 @@ target4.height=50
62 62
 target4.name=ConsoleTest
63 63
 target4.showInterface=false
64 64
 target4.type=UnitTestTargetJunit4
65
-target4.width=100
65
+target4.width=80
66 66
 target4.x=180
67 67
 target4.y=180
68 68
 target5.height=50