The Chastity nightclub has commissioned Company X to make an automatic bouncer. A junior developer (you) was instructed to write a visitor identification method that includes an age check. Would-be guests need to use the keyboard to enter their name and age. If the age is 20 or more, the auto-bouncer should assure the guest that everything is OK—18 is old enough.
You must be signed in to leave a comment
28 September 2020, 13:56
did it in 6 tries and feel like some great coder :) really don't understand BufferedReader
27 April 2021, 15:24
I might be too late but there was an article on BufferedReader, where they explain in depth what does BufferedReader means and when it is useful to use it
9 June 2020, 20:51
Oh my goodness, this was so frustrating. Tried it 8 times, and it was right, but since age was before name, it showed up wrong.
24 October 2018, 10:20
Scanner is simple to use.