Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Make the following modifications/enhancements to Version 0 of the Phonebook applicatiorn The phonebook should now contain a first game as well as a last mame
Make the following modifications/enhancements to Version 0 of the Phonebook applicatiorn The phonebook should now contain a first game as well as a last mame The format of the eatries in the file should be: Here is a sample execution of the program User input is in bold. Your program should replicate the prompts and output lookun, reverse-lookup, quit (? last name? Armow first name? David Last-name fArst-ms phone-somber The lookup process now prompts for both a last and a first name David Arnows phone number is 123-456-7890 lookup, reverse-lookup, quit (I/s/)? t phone umber (onn-nan.nann)? 456-789-0123 . A reverse lookup should also be provided, allowing a name to be obtained by supplying the 456-789-0123 belongsto Auzcnstin. Mosthe phone number Rather than continuing until the user signals end-of file (at the keyboard), the user enters a 'q' to indicate they are done lookup, reverse-lookup, quit (l/r/g)? 1 last name? Weiss first name? Jerrold After the user is done, the number of lookups and reverse lookups performed are printed Name not found Even though we introduce the terms state and behavior in the context of classes, the terms are still relevant here: the state by which we mean yariables- is enhanced via the introduction of a first name. Similarly, the behaviorie, methods-is enhanced through the introduction of a reverse lookup, as well as an enhanced name lookup (first and last) The name of your class should be Phonebook lookup, reverse-lookup, quit D/r/g? 1 last name? Weiss first name? Gerald Gerald Weiss's phone number is 789-012-3456 For example, if the file phansbeok text, contains: lookup, reverse-lookup, quit (Ir/Q)?r phone number (nna-nnn-nann)? 111-123-4567 Phone number not found AcooDavid 123-456-7898 HarrowKeith 234-567-8981 ones up, revense-lookup, quit (hsi0? q Jackie 345-678-9012 3 lookups performed 2 reverse lookups performed Augenstein Moshe 456-789-0123 Sokol Dina 67-898-1234 Tenenbaum Aaron 678-901-2345 Meiss Cox LangsamYedidyah 901-234-5678 Ibucn Gerald 789-812-3456 im890-123-4567 oseph 812-345-6789
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started