nafis nibir 6 years ago
parent
commit
9c17031c1a

BIN
Factorial.class View File


+ 5
- 0
Factorial.ctxt View File

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 View File


+ 7
- 0
FactorialTest.ctxt View File

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 View File


+ 11
- 0
IntegerPrinter.ctxt View File

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

+ 6
- 4
IntegerPrinter.java View File

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

BIN
IntegerPrinterTest.class View File


+ 11
- 0
IntegerPrinterTest.ctxt View File

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 View File


+ 7
- 0
LargestInteger.ctxt View File

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

+ 4
- 1
LargestInteger.java View File

4
 public class LargestInteger {
4
 public class LargestInteger {
5
 
5
 
6
     public Integer findLargestNumberUsingConditional(Integer[] integers){
6
     public Integer findLargestNumberUsingConditional(Integer[] integers){
7
+        
7
         return null;
8
         return null;
9
+       
8
     }
10
     }
9
-
11
+    
10
     public Integer findLargestNumberUsingMathMax(Integer[] integers){
12
     public Integer findLargestNumberUsingMathMax(Integer[] integers){
11
         return null;
13
         return null;
12
     }
14
     }
15
+    
13
 }
16
 }

BIN
LargestIntegerTest.class View File


+ 9
- 0
LargestIntegerTest.ctxt View File

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 View File


+ 9
- 0
NormalizeAngle.ctxt View File

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

+ 4
- 2
NormalizeAngle.java View File

4
 public class NormalizeAngle {
4
 public class NormalizeAngle {
5
 
5
 
6
     public Integer normalizeValueUsingModulo(Integer angle){
6
     public Integer normalizeValueUsingModulo(Integer angle){
7
-        return 0;
7
+        
8
+        return angle%360;
8
     }
9
     }
9
 
10
 
10
     public Integer normalizeValueUsingFloorMod(Integer integer){
11
     public Integer normalizeValueUsingFloorMod(Integer integer){
11
-        return 0;
12
+        int x = Math.floorMod(integer, 360);
13
+        return x;
12
     }
14
     }
13
 
15
 
14
     public static void main(String[] args){
16
     public static void main(String[] args){

BIN
NormalizeAngleTest.class View File


+ 9
- 0
NormalizeAngleTest.ctxt View File

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

BIN
ShortCalculator.class View File


+ 3
- 0
ShortCalculator.ctxt View File

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

BIN
ShortCalculatorTest.class View File


+ 3
- 0
ShortCalculatorTest.ctxt View File

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