Question
Write a program that maintains the names, birth dates, phone numbers of your friends and relatives. Create an input file with the information of one
Write a program that maintains the names, birth dates, phone numbers of your friends and relatives.
Create an input file with the information of one person per line and in the order listed above. (Put at least 20 people in the list). If I have time I will create and send you an input file - but meantime use your own. Names will be first name, last name (separated by a space). Birth dates will be in the form 04/01/2017. Phone numbers will be of the form 312-255-2000
Create a class called Person . An object of this class will contain the info for one person. To compare two Person objects, compare their last names.
You are to create a binary search tree of person objects.
Once the tree is created, the user should be able to input from the keyboard in order to:
1. enter another person
2. modify the info for a person
3. search this tree for all the data for a person . This means you print out all the data for the person.
4. The user should also be able to list everyone in the tree (and their info)
5. search for (and list) all the people who were born in a certain month
Your input is in a file. IT IS INCORRECT to input it into an array and then create a tree from the array. Some of you have done this in the labs, but although you get the right answer it is still BAD PRACTICE. Imagine you have 1 million records, putting them into an array and also a tree occupies twice as much space as you need, and you will quickly run out of space. You have to think about how efficient your programs are - not just whether you get the correct output.
Input File:
Bilal Alharsha 04/01/1993 312-255-2000 Ahmad Alshair 05/02/1992 345-233-4893 Ahmad Alzubi 06/03/1995 232-254-2230 Christopher Beck 07/04/1989 234-445-8594 William Burbatt 08/05/1992 435-645-7847 Maria Calderas 09/06/1993 234-654-5678 Roberto Cervantes 10/07/1995 342-565-2543 Nicholas Chiocca 11/08/1993 324-567-1231 Greg Cudzich 12/09/1993 876-897-8890 Daniel Delgado 01/10/1995 373-432-2345 Francisco Espinoza 04/01/1998 456-657-5677 Ismael Fernandez 05/02/2005 235-987-7894 Siobhan Finnerty 06/03/1992 345-765-0989 Rene Haskins 07/04/1990 768-463-7686 Miguel Ibarra 08/05/1900 654-765-4536 David Jones 09/06/1992 809-456-4567 Kenneth Koronkiewicz 01/23/1990 234-654-7686 Nicholas Lozano 02/11/1980 768-097-5674 Husain Mahmood 03/22/1996 546-324-3451 Scott Marzana 03/12/1996 123-456-5675 Jean Mehta 04/01/1993 432-524-7457 Iyman Mustafa 05/05/1992 234-678-8643 Jose Paz 12/01/1992 541-589-8475
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