Bladeren bron

Update README.md

Git-Leon 7 jaren geleden
bovenliggende
commit
cce3bcfda1
1 gewijzigde bestanden met toevoegingen van 22 en 9 verwijderingen
  1. 22
    9
      README.md

+ 22
- 9
README.md Bestand weergeven

97
 10: 256<br>
97
 10: 256<br>
98
 
98
 
99
 ## 7) Are we there yet?
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
 ## 8) Triangle
125
 ## 8) Triangle
113
 
126