Question
HELP IN JAVA: Write a program that maintains the names, birth dates, phone numbers of your friends and relatives. Create an input file with the
HELP IN JAVA:
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. 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. Assume they are equal if their last names are the same. (yes, this isn't reasonable but I didn't feel like asking you to have a unique identifier. So for this assignment everyone has a different last name)
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
6. quit
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
Seyed Razeghi 11/01/1989 859-893-9382
Jose Ruiz 10/01/1996 324-568-8457
Daniella Scialaba 09/12/1996 834-123-8473
Adrian Skwirut 08/17/1889 472-239-8273
Jacob Strong 07/21/1996 382-123-7843
Tom Sweiss 06/23/1990 378-837-9381
Nathaniel Topping 05/27/1994 374-392-0192
Ivan Villegas 01/23/1997 372-982-9182
Gabriel Wijtyk 02/11/2016 894-849-8429
Jiahao Xu 03/17/1993 374-928-9182
Rubric:
* Personal class with compareTo
* Menu of Options
* edit Person in tree
* print particular Person in tree
* add Person to Tree
* print entire tree
* well structured code
* list all people borin in a specific month
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