Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 699 Bytes

phonebook.md

File metadata and controls

33 lines (24 loc) · 699 Bytes

phonebook

Your task is to write a phonebook application where users can either query for names or phone numbers.

The phonebook consists of the following entries:

  • Alice, 0255334232
  • Bob, 0434235235
  • Franz, 095487963
  • Else, 024654968

Every entry has a name and a number.

The user is able to pass the name or phone number they're looking for via the command line:

Look up the entry by its number:

$ ruby phonebook.rb 024654968
=> Else

Look up the entry by its name:

$ ruby phonebook.rb Else
=> 024654968

If the phonebook does not contain the requested entry, the following should happen:

$ ruby phonebook.rb Notthere
=> No entry 'Notthere' found