Question: For this assignment, you will implement a dictionary to track the name and birthday of your friends and relatives. Your should support the following operations:

For this assignment, you will implement a dictionary to track the name and birthday of your friends and relatives. Your should support the following operations:
add an entry
remove an entry
search the dictionary for the birthday for a given name
display the name and birthday of every entry in the dictionary
display everyone in the dictionary who was born in a given month
The search key is the name, and you may assume that the names are unique.
Design and implement a C++ class to represent a Person, which contains a name and a birthday at minimum. It is up to you how to store the birthday. Additionally, design and implement a C++ class to represent an ADT Dictionary of Person objects. Do not use an existing library class for the dictionary, you must fully implement your own.
Searching for a person in your dictionary must be an average-case O(log n) operation; adding and removing can be O(n); and the "list everyone who was born in a given month" operation can be an O(n) operation. With these requirements in mind, it is up to you which type of dictionary to use. You are free to leverage any work done in previous assignments for this class.
You may create an interactive program which supports all of the required operations, or you may hard-code a sequence of operations that fully demonstrates your dictionary.
Hint: don't use a hash for this!
Submission
Submit your code base, and sample output demonstrating all of the above operations working on a dictionary with a handful of Person objects, to Canvas.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!