Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A phonebook contains names, numbers, and addresses of individuals and businesses. The phonebook is divided into two parts, the white pages and the yellow pages.
A phonebook contains names, numbers, and addresses of individuals and businesses. The phonebook is divided into two parts, the white pages and the yellow pages. The white pages contain information about individuals, while the yellow pages contain information about businesses.
Phonebooks are used to find addresses and phone numbers by looking for the name of an individual or business. Importantly, names can recur but phone numbers are unique . For convenient use, the names in both the white and yellow pages are sorted alphabetically.
Problem
Build an application that allows users to do a reverse phonebook lookup on individuals and businesses. That is, the application should allow a user to enter a phone number and return the names and addresses associated with the phone number.
The phonebook records are provided in the phonebook.txt file attached to this document.The application should load the phonebook into memory at most once while allowing the user to search for any amount of numbers.
The phonebook.txt contains each phonebook entry on a new line. Do not assume the records are unique and pay close attention to format by reviewing the document
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