Navigate to your Github repo on github.com
Switch to the branch projects/twenty-questions (menu on left top)
Click the green Code button
Click the Codespaces tab
Click the + to create a new codespace.
Wait for the codespace to open up.
In the file navigator on the left open up projects/twenty-questions
Right click on TwentyQuestions.java
and choose
“Open in Integrated Terminal”
In the terminal, type java TwentyQuestions.java
It should print “Is it an elephant?”
Type “y” and hit return.
As it stands, this program plays a boring game of One Question. You
should extend it, by creating nested if/else
pairs to
at least Three Questions.
The code will be pretty repetitive at this point. That’s okay. Feel free to make it better if you see a way but we’ll talk about that as a class later.