use Java
Problem Description
In this assignment, we will develop a phone call list for asports team. Each parent gives their name and number to the headcoach and agrees to phone at most 2 other parents if ever they arecalled with an update about a game or practice. The head coach isthe one who will be using our console application. This is acompletely new application so start fresh but reuse code from thecourse notes, your or my previous assignments and your labs whenapplicable. We will chose to store our list in a binary tree datastructure. You must use the base code from class and NOT thecollection class from JAVA.
Requirements
- Your program must be a console application that provides a userthis menu:Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit
- The menu must be displayed over and over until 7 isselected
- When the user selects item 1:
- If the phone call list is empty, that must be displayed to theuser
- If not empty, the phone call list will be displayedalphabetically
- When the user selects item 2:
- The user is prompted for a name and phone number
- Only valid phone number formats are accepted – characters inphone numbers can only be numbers, spaces, ‘-‘, ‘(‘ and ‘)’
- Valid phone numbers contain 10 or 11 digits, we will limit theformat to North American 1-613-111-2222 type.
- No duplicate entries are added into the phone call list – anentry is only a duplicate if the name and number are both thesame
- The contact is added into the tree in alphabetical order byname and then phone number
- You can store the phone number is a normalized format if youwish
- When the user selects item 3:
- The user is prompted for a file name
- The file format is expected to be
NamePhone NumberNamePhone Number… - If the file doesn’t exist, a proper error is displayed
- If the file does exist, your program should continue to addcontacts so long as there are valid name/phone number pairs foundin the file.
- When the user selects item 4:
- The user is prompted for a file name
- The file format is expected to be
NamePhone NumberNamePhone Number… - If the file doesn’t exist, a new file is created and allcontacts in the list are saved to the file
- If the file already exists, it is overwritten
- When the user selects item 5:
- The user is prompted for a name and phone number to searchfor
- If the contact is found, the message “Contact found in List” isdisplayed
- If the contact is not found, the message “Contact not in List”is displayed
- You must support various formats of phone numbers. For example,if at the time of entry, you provided 613-333-2222 and at the timeof search, the number is 16133332222, that should find theentry.
- When the user selects item 6:
- The phone list is displayed to the user in the form “<Namein Node> calls <Left Name, if exists> and <Right Name,if exists> where the values in <> are substituted for eachnode in the phone list
- If any given contact does not have anyone to call, “<Name inNode> calls No Contact” is displayed
- When the user selects item 7:
- The message “Exiting…” is displayed
- The program finishes
- Javadoc output is required
- A Test plan must be created, run and uploaded to Brightspace,if any of the tests do not pass, please specify.
- Optional, bonus marks will be given for making your binary treeand node classes generic/templated. Meaning that you specify whatyou will store in each node when you instantiate the tree. Note:this is quite challenging, you may want to complete the assignmentbefore trying to tackle this bonus.
Submission
You must submit to the assignment link in Brightspace by the duedate and time. Your submission should follow the SubmissionChecklist
- All source code – ie .java files with headers
- NOTE: we will re-compile and run yourprogram….so all code must be available to us and MUSTNOT be in a package.
- Headers should contain name, student number, assignment number,date, purpose of class
- Javadoc:
- Brief description of each data member and method should bedescribed using javadoc notation
- Generate the javadoc for your solution and upload a zip of thegenerated folder with a member visibility of Private
- In Eclipse, go to Project->Generate javadoc, select yourproject and “Create Javadoc for members with Visibility: Private”then click Finish.
- Testplan
- Can be in word or pdf format
- Should contain positive and negative testing (sometimes calledhappy path and unhappy path)
Failure to provide any of the above will have an effect on yourgrade for this assignment.
Sample Output: green is user input
Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit1Phone ListList is EmptyPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit2Enter name of contact: Melissa SienkiewiczEnter phone number for contact: 613-333-1111Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit2Enter name of contact: Jakub SienkiewiczEnter phone number for contact: 613-444-5555Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit2Enter name of contact: Tom SmithEnter phone number for contact: 1-301-333-4242Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit2Enter name of contact: Melissa SmithEnter phone number for contact: (613) 444 5555Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit1Phone ListJakub Sienkiewicz: 1-613-444-5555 Melissa Sienkiewicz: 1-613-333-1111Melissa Smith: 1-613-444-5555Tom Smith: 1-301-333-4242 Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit6Here are everyone’s responsibilities:Melissa Sienkiewicz calls Jakub Sienkiewicz and Tom SmithJakub Sienkiewicz calls No ContactTom Smith calls Melissa SmithMelissa Smith calls No ContactPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit5Enter name of contact: Melissa SienkiewiczEnter phone number for contact: 1-613-333-1111Contact found in ListPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit4Specify a filename to save: Assignment3.txtPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit3Enter name of file to write to: Assignment3b.txtDuplicate – not adding Melissa Smith: 1-613-444-5555Duplicate – not adding Tom Smith: 1-301-333-4242Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit1Phone ListAdam Dahir: 1-286-980-0894Alex Morrisette: 1-959-886-5623Alexander Ankenmann: 1-492-666-3956Erik Mork: 1-583-397-9072Jakub Polanski: 1-613-444-5555Jakub Sienkiewicz: 1-613-444-5555Jeremy Fairman: 1-263-609-6255Julyuze Co: 1-359-410-0768Ling Zhong: 1-295-628-0844Lovedeep Kaur: 1-499-560-0108Lovepreet Singh: 1-215-253-6137Melissa Sienkiewicz: 1-613-333-1111Melissa Sienkiewicz: 1-613-555-7420Melissa Smith: 1-613-444-5555Muhammad Said: 1-454-237-1460Nirmalkumar Prajapati: 1-557-890-2948Rosalie Gagnon: 1-801-460-4343Tom Smith: 1-301-333-4242Zohra Bawar: 1-749-379-0235Please select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit6Here are everyone’s responsibilities:Melissa Sienkiewicz calls Jakub Sienkiewicz and Tom SmithJakub Sienkiewicz calls Jakub Polanski and Ling ZhongJakub Polanski calls Alexander AnkenmannAlexander Ankenmann calls Adam Dahir and Erik MorkAdam Dahir calls Alex MorrisetteAlex Morrisette calls No ContactErik Mork calls No ContactLing Zhong calls Julyuze Co and Lovepreet SinghJulyuze Co calls Jeremy FairmanJeremy Fairman calls No ContactLovepreet Singh calls Lovedeep KaurLovedeep Kaur calls No ContactTom Smith calls Melissa Smith and Zohra BawarMelissa Smith calls Melissa Sienkiewicz and Nirmalkumar PrajapatiMelissa Sienkiewicz calls No ContactNirmalkumar Prajapati calls Muhammad Said and Rosalie GagnonMuhammad Said calls No ContactRosalie Gagnon calls No ContactZohra Bawar calls No ContactPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit5Enter name of contact: Melissa SmithEnter phone number for contact: 1112223333Contact not in ListPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit5Enter name of contact: Melissa SmithEnter phone number for contact: 1-613-444-5555Contact found in ListPlease select one of the following:1: Display the Phone Tree2: Add one Contact to the List3: Add Contacts from a File4: Save Contacts to a File5: Determine if a Contact is in the List6: List out who calls whom7: To Exit7Exiting…
Expert Answer
Answer to use Java Problem Description In this assignment, we will develop a phone call list for a sports team. Each parent gives …