Arin Turpin 6 jaren geleden
bovenliggende
commit
20a73523ff

BIN
Factorial.class Bestand weergeven


+ 5
- 0
Factorial.ctxt Bestand weergeven

@@ -0,0 +1,5 @@
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

BIN
FactorialTest.class Bestand weergeven


+ 7
- 0
FactorialTest.ctxt Bestand weergeven

@@ -0,0 +1,7 @@
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

BIN
IntegerPrinter.class Bestand weergeven


+ 11
- 0
IntegerPrinter.ctxt Bestand weergeven

@@ -0,0 +1,11 @@
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

+ 7
- 6
IntegerPrinter.java Bestand weergeven

@@ -1,18 +1,19 @@
1
- 
2
-
3 1
 
4 2
 public class IntegerPrinter {
5
-
6 3
     public String printIntegerAsBinary(int value){
7
-        return null;
4
+        String convert = Integer.toBinaryString(value);
5
+        System.out.println(convert);
6
+        return convert;
8 7
     }
9 8
 
10 9
     public String printIntegerAsOctal(int value){
11
-        return null;
10
+        String convert = Integer.toOctalString(value);
11
+        return convert;
12 12
     }
13 13
 
14 14
     public String printIntegerAsHexadecimal(int value){
15
-        return null;
15
+        String convert = Integer.toHexString(value);
16
+        return convert;
16 17
     }
17 18
 
18 19
     public static void main(String[] args){

BIN
IntegerPrinterTest.class Bestand weergeven


+ 11
- 0
IntegerPrinterTest.ctxt Bestand weergeven

@@ -0,0 +1,11 @@
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

BIN
LargestInteger.class Bestand weergeven


+ 7
- 0
LargestInteger.ctxt Bestand weergeven

@@ -0,0 +1,7 @@
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

BIN
LargestIntegerTest.class Bestand weergeven


+ 9
- 0
LargestIntegerTest.ctxt Bestand weergeven

@@ -0,0 +1,9 @@
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

BIN
NormalizeAngle.class Bestand weergeven


+ 9
- 0
NormalizeAngle.ctxt Bestand weergeven

@@ -0,0 +1,9 @@
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

+ 3
- 1
NormalizeAngle.java Bestand weergeven

@@ -4,10 +4,12 @@
4 4
 public class NormalizeAngle {
5 5
 
6 6
     public Integer normalizeValueUsingModulo(Integer angle){
7
-        return 0;
7
+        int normalizedAngle = angle%360;
8
+        return normalizedAngle;
8 9
     }
9 10
 
10 11
     public Integer normalizeValueUsingFloorMod(Integer integer){
12
+        Integer normalizedAngle = Math.floor(integer)%360;
11 13
         return 0;
12 14
     }
13 15
 

BIN
NormalizeAngleTest.class Bestand weergeven


+ 9
- 0
NormalizeAngleTest.ctxt Bestand weergeven

@@ -0,0 +1,9 @@
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

+ 0
- 0
README.TXT Bestand weergeven


BIN
ShortCalculator.class Bestand weergeven


+ 3
- 0
ShortCalculator.ctxt Bestand weergeven

@@ -0,0 +1,3 @@
1
+#BlueJ class context
2
+comment0.target=ShortCalculator
3
+numComments=1

BIN
ShortCalculatorTest.class Bestand weergeven


+ 3
- 0
ShortCalculatorTest.ctxt Bestand weergeven

@@ -0,0 +1,3 @@
1
+#BlueJ class context
2
+comment0.target=ShortCalculatorTest
3
+numComments=1

+ 5
- 5
package.bluej Bestand weergeven

@@ -15,15 +15,15 @@ editor.fx.0.height=0
15 15
 editor.fx.0.width=0
16 16
 editor.fx.0.x=0
17 17
 editor.fx.0.y=0
18
-objectbench.height=101
18
+objectbench.height=99
19 19
 objectbench.width=1070
20 20
 package.divider.horizontal=0.6
21
-package.divider.vertical=0.837593984962406
22
-package.editor.height=550
21
+package.divider.vertical=0.8374233128834356
22
+package.editor.height=539
23 23
 package.editor.width=968
24 24
 package.editor.x=59
25
-package.editor.y=82
26
-package.frame.height=723
25
+package.editor.y=22
26
+package.frame.height=710
27 27
 package.frame.width=1094
28 28
 package.numDependencies=4
29 29
 package.numTargets=10