ソースを参照

Update README.md

Git-Leon 7 年 前
コミット
cce3bcfda1
共有1 個のファイルを変更した22 個の追加9 個の削除を含む
  1. 22
    9
      README.md

+ 22
- 9
README.md ファイルの表示

@@ -97,17 +97,30 @@ In the class **Numbers**, complete the method called **powers()** so that it ret
97 97
 10: 256<br>
98 98
 
99 99
 ## 7) Are we there yet?
100
+* Modify method `areWeThereYet` in the class `CarRide`.
101
+	* This method should  return `"Good!"` when receiving an argument of `"Yes"`.
102
+* Create class `CarRideTest`
103
+	* Create method `testAreWeThereYet1`
104
+		* The method should ensure the `areWeThereYet` method returns `"Good!"` upon passing an arugment of `"Yes"`.
100 105
 
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.
106
+	* Create method `testAreWeThereYet2`
107
+		* The method should ensure the `areWeThereYet` method does not return `"Good!"` when receving an argument that is not `"Yes"`.
102 108
 
103
-### Example<br>
104
-1: "Are we there yet?"<br>
105
-2: No<br>
106
-3: "Are we there yet?"<br>
107
-4: Spoons<br>
108
-5: "Are we there yet?"<br>
109
-6: Yes<br>
110
-7: Good!<br>
109
+* Create class `MainApplication`
110
+	* Using the `CarRide` class, continually prompt the user for input until they response with `"Yes"`.
111
+	* Upon termination, the application should display the value returned from invokation of `areWeThereYet`.
112
+
113
+
114
+### Sample Console Output<br>
115
+```
116
+1: Are we there yet?
117
+2: No
118
+3: Are we there yet?
119
+4: Spoons
120
+5: Are we there yet?
121
+6: Yes
122
+7: Good!
123
+```
111 124
 
112 125
 ## 8) Triangle
113 126