Write a secure contacts program that will achieve the following:
Authenticate users, if a user does not have a username and password they will not be able to access the program.Β
Present program functions (menu)
Give the user the following menu that will allow them to access the program:
read contacts from a file (function)
add contact (function)
display all contacts (procedure)
search for contact (procedure)
save contacts to a file (procedure)
log out of program
Your program should only initially look to store the first name and the phone number of you contact.
1. read from a file (function)
When this option is selected the program should:
open a pre-existing files called names.txt and numbers.txt
append all names to a 2d array
close files
output message stating loaded contacts
2. add contact (function)
When this option is selected the program should:
prompt the user to enter the first name and phone number for the new contact
append each piece of data to the array(s)
3. display all contacts (procedure)
When this option is selected the program should:
output all linked elements in the array(s) in a meaningful way
4. search for a contact (procedure)
When this option is selected the program should:
prompt the user for a name of a contact to search for
use a linear search to scan your array
output the name and linked phone number if present in the array(s)
if not present give a suitable message.Β
5. save contacts to a file (procedure)
When this option is selected the program should:
open the files names.txt and numbers.txt
write data from the array to a file
close files
output message stating saved
6. log out of program
output suitable good by message
allow the program to end