ConsoleReader class

  • 4
  • Locked
  • Exercise
Today students at the secret CodeGym center received a reading assignment. They (and you) need to create a ConsoleReader class with 4 static methods: one of them reads a string from the keyboard, the second — an integer, and the third — a fractional number. The fourth is different: it reads the string "true" or "false" from the keyboard and returns the corresponding boolean value.
You can't complete this task, because you're not signed in.
Comments(5)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
ThomasLevel 9
9 December 2018, 16:19
I found this helpful for this task: http://www.cs.utexas.edu/users/mitra/csSpring2004/cs313/assgn/BufferedReader.html
P. PukLevel 9 , Amsterdam
26 November 2018, 13:54
The assignment states to read a string(!) and return the boolean true or false. If I read a string and return true if the string is "true" or false if the string is "false" then I get the comment to read a boolean! So the assignment isn't clear...
Koushik KintaliLevel 9 , Rayagada
20 October 2018, 09:54
How can we read a boolean value from keyboard
RomanLevel 41
22 October 2018, 05:27
You can read the string "true" or "false" from the keyboard and convert it to the corresponding boolean value (true or false).
Kimberly HughesLevel 8 , San Antonio
16 September, 03:32
The question is how to do that.