#33 ternary is my new friend @rjsmall90

開啟中
rjsmall90 請求將 1 次程式碼提交從 rjsmall90/ZCW-BasicComputations-BlueJ:master 合併至 master

二進制
Factorial.class 查看文件


+ 5
- 0
Factorial.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=Factorial
3
+comment1.params=value
4
+comment1.target=java.math.BigInteger\ factorialOf(java.lang.Integer)
5
+numComments=2

二進制
FactorialTest.class 查看文件


+ 7
- 0
FactorialTest.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=FactorialTest
3
+comment1.params=
4
+comment1.target=void\ setUp()
5
+comment2.params=
6
+comment2.target=void\ factorialOfTest()
7
+numComments=3

二進制
IntegerPrinter.class 查看文件


+ 11
- 0
IntegerPrinter.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=IntegerPrinter
3
+comment1.params=value
4
+comment1.target=java.lang.String\ printIntegerAsBinary(int)
5
+comment2.params=value
6
+comment2.target=java.lang.String\ printIntegerAsOctal(int)
7
+comment3.params=value
8
+comment3.target=java.lang.String\ printIntegerAsHexadecimal(int)
9
+comment4.params=args
10
+comment4.target=void\ main(java.lang.String[])
11
+numComments=5

二進制
IntegerPrinterTest.class 查看文件


+ 11
- 0
IntegerPrinterTest.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=IntegerPrinterTest
3
+comment1.params=
4
+comment1.target=void\ setUp()
5
+comment2.params=
6
+comment2.target=void\ printIntegerAsBinaryTest()
7
+comment3.params=
8
+comment3.target=void\ printIntegerAsHexadecimal()
9
+comment4.params=
10
+comment4.target=void\ printIntegerAsOctalTest()
11
+numComments=5

二進制
LargestInteger.class 查看文件


+ 7
- 0
LargestInteger.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=LargestInteger
3
+comment1.params=integers
4
+comment1.target=java.lang.Integer\ findLargestNumberUsingConditional(java.lang.Integer[])
5
+comment2.params=integers
6
+comment2.target=java.lang.Integer\ findLargestNumberUsingMathMax(java.lang.Integer[])
7
+numComments=3

+ 11
- 3
LargestInteger.java 查看文件

1
- 
1
+ import java.util.*; 
2
 
2
 
3
 
3
 
4
 public class LargestInteger {
4
 public class LargestInteger {
5
 
5
 
6
     public Integer findLargestNumberUsingConditional(Integer[] integers){
6
     public Integer findLargestNumberUsingConditional(Integer[] integers){
7
-        return null;
7
+        int count = 0; 
8
+        for(Integer i : integers) {
9
+            count = (i > count) ? i:count;
10
+        }
11
+        return count; 
8
     }
12
     }
9
 
13
 
10
     public Integer findLargestNumberUsingMathMax(Integer[] integers){
14
     public Integer findLargestNumberUsingMathMax(Integer[] integers){
11
-        return null;
15
+     int count = 0; 
16
+        for(Integer i : integers) {
17
+            count = Math.max(i, i); 
18
+        }
19
+        return count; 
12
     }
20
     }
13
 }
21
 }

二進制
LargestIntegerTest.class 查看文件


+ 9
- 0
LargestIntegerTest.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=LargestIntegerTest
3
+comment1.params=
4
+comment1.target=void\ setUp()
5
+comment2.params=
6
+comment2.target=void\ findLargestNumberUsingConditionalTest()
7
+comment3.params=
8
+comment3.target=void\ findLargestNumberUsingMathMaxTest()
9
+numComments=4

二進制
NormalizeAngle.class 查看文件


+ 9
- 0
NormalizeAngle.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=NormalizeAngle
3
+comment1.params=angle
4
+comment1.target=java.lang.Integer\ normalizeValueUsingModulo(java.lang.Integer)
5
+comment2.params=integer
6
+comment2.target=java.lang.Integer\ normalizeValueUsingFloorMod(java.lang.Integer)
7
+comment3.params=args
8
+comment3.target=void\ main(java.lang.String[])
9
+numComments=4

二進制
NormalizeAngleTest.class 查看文件


+ 9
- 0
NormalizeAngleTest.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=NormalizeAngleTest
3
+comment1.params=
4
+comment1.target=void\ setUp()
5
+comment2.params=
6
+comment2.target=void\ normalizeValueUsingModuloTest()
7
+comment3.params=
8
+comment3.target=void\ normalizeValueUsingFloorModTest()
9
+numComments=4

二進制
ShortCalculator.class 查看文件


+ 3
- 0
ShortCalculator.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=ShortCalculator
3
+numComments=1

二進制
ShortCalculatorTest.class 查看文件


+ 3
- 0
ShortCalculatorTest.ctxt 查看文件

1
+#BlueJ class context
2
+comment0.target=ShortCalculatorTest
3
+numComments=1

+ 12
- 12
package.bluej 查看文件

11
 dependency4.from=IntegerPrinterTest
11
 dependency4.from=IntegerPrinterTest
12
 dependency4.to=IntegerPrinter
12
 dependency4.to=IntegerPrinter
13
 dependency4.type=UsesDependency
13
 dependency4.type=UsesDependency
14
-editor.fx.0.height=0
15
-editor.fx.0.width=0
16
-editor.fx.0.x=0
17
-editor.fx.0.y=0
18
-objectbench.height=101
19
-objectbench.width=1070
20
-package.divider.horizontal=0.6
21
-package.divider.vertical=0.837593984962406
22
-package.editor.height=550
14
+editor.fx.0.height=722
15
+editor.fx.0.width=800
16
+editor.fx.0.x=240
17
+editor.fx.0.y=26
18
+objectbench.height=99
19
+objectbench.width=637
20
+package.divider.horizontal=0.5996275605214153
21
+package.divider.vertical=0.8384146341463414
22
+package.editor.height=543
23
 package.editor.width=968
23
 package.editor.width=968
24
-package.editor.x=59
25
-package.editor.y=82
26
-package.frame.height=723
24
+package.editor.x=44
25
+package.editor.y=22
26
+package.frame.height=714
27
 package.frame.width=1094
27
 package.frame.width=1094
28
 package.numDependencies=4
28
 package.numDependencies=4
29
 package.numTargets=10
29
 package.numTargets=10