Explorar el Código

edited readmes

Leon hace 6 años
padre
commit
dda7744094

+ 12
- 0
README-NumberUtilities.md Ver fichero

1
 # NumberUtilities
1
 # NumberUtilities
2
+* Ensure each of the test cases in the class [NumberUtilitiesTest]() successfully passes upon completion of each method stubs in the class [NumberUtilities]().
3
+    * `String getEvenNumbers(int start, int stop)` 
4
+    * `String getOddNumbers(int start, int stop)`
5
+    * `String getSquareNumbers(int start, int stop, int step)` 
6
+    * `String getRange(int start, int stop, int step)` 
7
+    * `String getExponentiations(int start, int stop, int step, int exponent)` 
8
+    
9
+
10
+
11
+
12
+
13
+
2
 
14
 
3
 ## `String getRange(int stop)`
15
 ## `String getRange(int stop)`
4
 * **Description**
16
 * **Description**

+ 187
- 13
README-TableUtilities.md Ver fichero

1
 # TableUtilities
1
 # TableUtilities
2
+* Ensure each of the test cases in the class [TableUtilitiesTest]() successfully passes upon completion of each method stubs in the class [TableUtilities]().
3
+    * `String getLargeMultiplicationTable()`
4
+    * `String getSmallMultiplicationTable()`
5
+    * `String getMultiplicationTable(int width)`
2
 
6
 
3
-## `String tableSquare(int n)`
7
+
8
+
9
+
10
+    
11
+    
12
+    
13
+    
14
+    
15
+    
16
+    
17
+    
18
+    
19
+    
20
+    
21
+    
22
+    
23
+    
24
+    
25
+    
26
+    
27
+    
28
+    
29
+    
30
+    
31
+    
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+## `String getSmallMultiplicationTable()`
40
+* **Description**
41
+    * Generate a `String` representation of a multiplication table whose dimensions are `4` by `4`
42
+	
43
+### Example 1
44
+* Sample Script
45
+
46
+    ```
47
+    // : Given    
48
+    // : When
49
+    String outcome = TableUtilities.getSmallMultiplicationTable();
50
+    
51
+    // : Then
52
+    System.out.println(outcome);
53
+    ```
54
+
55
+
56
+
57
+* Sample Output
58
+
59
+    ```
60
+      1 |  2 |  3 |  4 |
61
+      2 |  4 |  6 |  8 |
62
+      3 |  6 |  9 | 12 |
63
+      4 |  8 | 12 | 16 |
64
+    ```
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+    
73
+    
74
+    
75
+    
76
+    
77
+    
78
+    
79
+    
80
+    
81
+    
82
+    
83
+    
84
+    
85
+    
86
+    
87
+    
88
+    
89
+    
90
+    
91
+    
92
+    
93
+    
94
+    
95
+    
96
+    
97
+    
98
+    
99
+    
100
+    
101
+    
102
+    
103
+    
104
+    
105
+
106
+## `String getLargeMultiplicationTable()`
107
+* **Description**
108
+    * Given one integer, `width`, generate a `String` representation of a multiplication table whose dimensions are `width` by `width`
109
+
110
+	
111
+### Example
112
+* Sample Script
113
+
114
+    ```
115
+    // : Given
116
+    int n = 3;
117
+    
118
+    // : When
119
+    String outcome = Tables.getLargeMultiplicationTable();
120
+    
121
+    // : Then
122
+    System.out.println(outcome);
123
+    ```
124
+
125
+
126
+
127
+* Sample Output
128
+
129
+    ```
130
+    1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 | 10 |
131
+    2 |  4 |  6 |  8 | 10 | 12 | 14 | 16 | 18 | 20 |
132
+    3 |  6 |  9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 |
133
+    4 |  8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 |
134
+    5 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 |
135
+    6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 |
136
+    7 | 14 | 21 | 28 | 35 | 42 | 49 | 56 | 63 | 70 |
137
+    8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 |
138
+    9 | 18 | 27 | 36 | 45 | 54 | 63 | 72 | 81 | 90 |
139
+   10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 |100 |
140
+   
141
+    ```
142
+    
143
+    
144
+    
145
+    
146
+    
147
+    
148
+    
149
+    
150
+    
151
+    
152
+    
153
+    
154
+    
155
+    
156
+    
157
+    
158
+    
159
+    
160
+    
161
+    
162
+    
163
+    
164
+    
165
+    
166
+    
167
+    
168
+    
169
+    
170
+    
171
+    
172
+    
173
+    
174
+    
175
+    
176
+    
177
+    
178
+## `String getMultiplicationTable(int width)`
4
 * **Description**
179
 * **Description**
5
-    * Given one integer, `n`, generate a `String` representation of a multiplication table whose dimensions are `n` by `n`
180
+    * Given one integer, `width`, generate a `String` representation of a multiplication table whose dimensions are `width` by `width`
6
 
181
 
7
 	
182
 	
8
 ### Example 1
183
 ### Example 1
10
 
185
 
11
     ```
186
     ```
12
     // : Given
187
     // : Given
13
-    int n = 4;
188
+    int n = 3;
14
     
189
     
15
     // : When
190
     // : When
16
     String outcome = Tables.getMultiplicationTable(n);
191
     String outcome = Tables.getMultiplicationTable(n);
24
 * Sample Output
199
 * Sample Output
25
 
200
 
26
     ```
201
     ```
27
-    |  1 |  2 |  3 |  4 |
28
-    |  2 |  4 |  6 |  8 |
29
-    |  3 |  6 |  9 | 12 |
30
-    |  4 |  8 | 12 | 16 |
202
+      1 |  2 |  3 |
203
+      2 |  4 |  6 |
204
+      3 |  6 |  9 |
31
     ```
205
     ```
32
 
206
 
33
 
207
 
51
 * Sample Output
225
 * Sample Output
52
 
226
 
53
     ```
227
     ```
54
-    | 1 |  2 |  3 |  4 |  5 |  6 |
55
-    | 2 |  4 |  6 |  8 | 10 | 12 |
56
-    | 3 |  6 |  9 | 12 | 15 | 18 |
57
-    | 4 |  8 | 12 | 16 | 20 | 24 |
58
-    | 5 | 10 | 15 | 20 | 25 | 30 |
59
-    | 6 | 12 | 18 | 24 | 30 | 36 |
228
+     1 |  2 |  3 |  4 |  5 |  6 |
229
+     2 |  4 |  6 |  8 | 10 | 12 |
230
+     3 |  6 |  9 | 12 | 15 | 18 |
231
+     4 |  8 | 12 | 16 | 20 | 24 |
232
+     5 | 10 | 15 | 20 | 25 | 30 |
233
+     6 | 12 | 18 | 24 | 30 | 36 |
60
     ```
234
     ```

+ 4
- 4
README.md Ver fichero

1
 # ZCW-MicroLabs-Loops
1
 # ZCW-MicroLabs-Loops
2
-## 1) NumberUtilities
3
-## 2) TriangleUtilities
4
-## 3) TableUtilities
5
-
2
+* Read through each of the following `README` files and complete each of the asks.
3
+    * [README-NumberUtilities.md](./README-NumberUtilities.md)
4
+    * [README-TriangleUtilities.md](./README-NumberUtilities.md)
5
+    * [README-TableUtilities.md](./README-NumberUtilities.md)
6
 
6
 
7
 
7
 
8
 
8
 

+ 0
- 1
src/test/java/io/zipcoder/microlabs/mastering_loops/TableUtilitiesTest.java Ver fichero

62
                 " 18 | 36 | 54 | 72 | 90 |108 |126 |144 |162 |180 |198 |216 |234 |252 |270 |288 |306 |324 |342 |360 |\n" +
62
                 " 18 | 36 | 54 | 72 | 90 |108 |126 |144 |162 |180 |198 |216 |234 |252 |270 |288 |306 |324 |342 |360 |\n" +
63
                 " 19 | 38 | 57 | 76 | 95 |114 |133 |152 |171 |190 |209 |228 |247 |266 |285 |304 |323 |342 |361 |380 |\n" +
63
                 " 19 | 38 | 57 | 76 | 95 |114 |133 |152 |171 |190 |209 |228 |247 |266 |285 |304 |323 |342 |361 |380 |\n" +
64
                 " 20 | 40 | 60 | 80 |100 |120 |140 |160 |180 |200 |220 |240 |260 |280 |300 |320 |340 |360 |380 |400 |\n";
64
                 " 20 | 40 | 60 | 80 |100 |120 |140 |160 |180 |200 |220 |240 |260 |280 |300 |320 |340 |360 |380 |400 |\n";
65
-
66
         String actual = TableUtilities.getMultiplicationTable(20);
65
         String actual = TableUtilities.getMultiplicationTable(20);
67
         Assert.assertEquals(expected, actual);
66
         Assert.assertEquals(expected, actual);
68
     }
67
     }

BIN
target/classes/io/zipcoder/microlabs/mastering_loops/MainApp.class Ver fichero


BIN
target/classes/io/zipcoder/microlabs/mastering_loops/TableUtilities.class Ver fichero


BIN
target/classes/io/zipcoder/microlabs/mastering_loops/TriangleUtilities.class Ver fichero


BIN
target/test-classes/io/zipcoder/microlabs/mastering_loops/TableUtilitiesTest.class Ver fichero