Bouncer policy

  • 2
  • Locked
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 can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Joe M
Level 47 , Owings Mills, United States
28 September 2020, 13:56
did it in 6 tries and feel like some great coder :) really don't understand BufferedReader
Level 8 , Hutton Bushel, United Kingdom
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
Level 9 , Washington DC, United States
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.
Level 11 , Radomsko, Poland
24 October 2018, 10:20
Scanner is simple to use.