|
@@ -35,7 +35,7 @@ In the class **Numbers**, complete the method called **oneToTen()** so that it r
|
35
|
35
|
12: 19<br>
|
36
|
36
|
|
37
|
37
|
## 3) Square Numbers
|
38
|
|
- In the class **Numbers**, complete the method called **squares()** so that it returns a string of the square numbers up to 100. The Unit Test is not provided for you, you must complete it.
|
|
38
|
+In the class **Numbers**, complete the method called **squares()** so that it returns a string of the square numbers up to 100. The Unit Test is not provided for you, you must complete it.
|
39
|
39
|
|
40
|
40
|
### Example<br>
|
41
|
41
|
1: squares()<br>
|
|
@@ -67,7 +67,7 @@ In the class **Numbers**, complete the method called **random4()** so that it re
|
67
|
67
|
|
68
|
68
|
In the class **Numbers**, complete the method called **even()** so that it returns a string of the positive even numbers less than n. The Unit Test is not provided for you, you must complete it.
|
69
|
69
|
|
70
|
|
- ### Example<br>
|
|
70
|
+### Example<br>
|
71
|
71
|
1: even(20)<br>
|
72
|
72
|
2: *** Output *** <br>
|
73
|
73
|
3: 2<br>
|
|
@@ -82,9 +82,9 @@ In the class **Numbers**, complete the method called **even()** so that it retur
|
82
|
82
|
|
83
|
83
|
## 6) Powers of 2
|
84
|
84
|
|
85
|
|
- In the class **Numbers**, complete the method called **powers()** so that it returns a string of out the powers of 2 from 2^1 up to to 2^n. The Unit Test is not provided for you, you must complete it.
|
|
85
|
+In the class **Numbers**, complete the method called **powers()** so that it returns a string of out the powers of 2 from 2^1 up to to 2^n. The Unit Test is not provided for you, you must complete it.
|
86
|
86
|
|
87
|
|
- ### Example<br>
|
|
87
|
+### Example<br>
|
88
|
88
|
1: powers(8)<br>
|
89
|
89
|
2: *** Output *** <br>
|
90
|
90
|
3: 2<br>
|
|
@@ -98,9 +98,9 @@ In the class **Numbers**, complete the method called **even()** so that it retur
|
98
|
98
|
|
99
|
99
|
## 7) Are we there yet?
|
100
|
100
|
|
101
|
|
- In the class **CarRide**, complete the class so that it returns that outputs "Are we there yet?" and then waits for input. If the input is "Yes" the program ouputs "Good!" and exits, otherwite the program loops. The Unit Tests is not provided for you, you must complete it.
|
|
101
|
+In the class **CarRide**, complete the class so that it returns that outputs "Are we there yet?" and then waits for input. If the input is "Yes" the program ouputs "Good!" and exits, otherwite the program loops. The Unit Tests is not provided for you, you must complete it.
|
102
|
102
|
|
103
|
|
- ### Example<br>
|
|
103
|
+### Example<br>
|
104
|
104
|
1: "Are we there yet?"<br>
|
105
|
105
|
2: No<br>
|
106
|
106
|
3: "Are we there yet?"<br>
|
|
@@ -111,9 +111,9 @@ In the class **Numbers**, complete the method called **even()** so that it retur
|
111
|
111
|
|
112
|
112
|
## 8) Triangle
|
113
|
113
|
|
114
|
|
- In the class **Shapes**, complete the method called **triangle()** so that it uses nested loops to produce the following pattern . The Unit Test is not provided for you, you must complete it.
|
|
114
|
+In the class **Shapes**, complete the method called **triangle()** so that it uses nested loops to produce the following pattern . The Unit Test is not provided for you, you must complete it.
|
115
|
115
|
|
116
|
|
- ### Example<br>
|
|
116
|
+### Example<br>
|
117
|
117
|
1: triangle()<br>
|
118
|
118
|
2: *** Output *** <br>
|
119
|
119
|
3: * <br>
|
|
@@ -124,9 +124,9 @@ In the class **Numbers**, complete the method called **even()** so that it retur
|
124
|
124
|
|
125
|
125
|
## 9) Table Square
|
126
|
126
|
|
127
|
|
- In the class **Shapes**, complete the method called **tableSquare()** so that it uses nested loops to produce a 4x4 table square. The Unit Test is not provided for you, you must complete it.
|
|
127
|
+In the class **Shapes**, complete the method called **tableSquare()** so that it uses nested loops to produce a 4x4 table square. The Unit Test is not provided for you, you must complete it.
|
128
|
128
|
|
129
|
|
- ### Example<br>
|
|
129
|
+### Example<br>
|
130
|
130
|
tableSquare()<br>
|
131
|
131
|
*** Output *** <br>
|
132
|
132
|
A 4 x 4 table square<br>
|
|
@@ -139,11 +139,11 @@ A 4 x 4 table square<br>
|
139
|
139
|
|
140
|
140
|
```
|
141
|
141
|
|
142
|
|
- ## 10) Table Squares
|
|
142
|
+ ## 10) Table Squares
|
143
|
143
|
|
144
|
|
- In the class **Shapes**, extend your answer to the last question produce a method that will return string of characters out og ***n x n*** table square. The Unit Test is not provided for you, you must complete it.
|
|
144
|
+ In the class **Shapes**, extend your answer to the last question produce a method that will return string of characters out og ***n x n*** table square. The Unit Test is not provided for you, you must complete it.
|
145
|
145
|
|
146
|
|
- ### Example<br>
|
|
146
|
+### Example<br>
|
147
|
147
|
tableSquares(6)<br>
|
148
|
148
|
*** Output *** <br>
|
149
|
149
|
A 6 x 6 table square<br>
|