0

Write a program to record simple phone book??

Write a program in which user input 1. name 2. Phone number 3.email 4.address •Store contact information in text file •If new record enter it should have different name •Give option to user to search contact by name Any hint will work......how to start the program..... please help

22nd Jan 2022, 7:16 PM
Hafsa batool
2 Antworten
+ 1
G'day Hafsa batool Have you got your psuedocode for your program? A. Seems that you know which variables you want, you know that you want the user to be able to input them. Start coding with adding new entries to a list/struct/dictionary (?C++?). Once that works & repeats, then you can add more functionality. B. Text file, do you know how to create/write/read from a file? C. Will you allow the user to have blanks, eg if they don't want to list their email or phone? Do you know how to check for valid format of email/phone? D. Will their name be the unique identifier, or something else? What if there is 2 people called John Smith? I would have an index number as the unique id. E. Search function could give similar names as they enter their details? Perhaps you could take a character at a time instead of reading the whole string, perhaps you can start matching with existing records when the user has entered 3 characters, eg "Bro" from the user shows : Brock, Peter Brown , John Browning, Jane - - -
24th Jan 2022, 11:14 AM
HungryTradie
HungryTradie - avatar
+ 1
Thanks
24th Jan 2022, 1:30 PM
Hafsa batool