you are required to develop an application for maintaining atelephone directory.
ID: 3609927 • Letter: Y
Question
you are required to develop an application for maintaining atelephone directory. Application will provide an interface to userfor letting him perform different tasks which will include:
Add New Entry:
Delete an Entry:
Search an Entry:
Exit:
The directory may contain N-Number of records. Each directoryentry will contain a single record and each record will consist ofperson CNIC, Name, Address and telephone Number. User will be ableto modify the Address and telephone number only. You can use“Struct” structure as dynamic array, for storingrecords.
Note:
The number of records should not be fixed and user should beable to enter as many records as possible, you will have to useLinked List for this purpose.
Hint:
Following data structure may be used to store each record:
Struct Record;
struct Record{
Char * sCNIC; // Used to store
Char * sName;
Char * sAddress;
Char * sPhone;
Record * pNext; //Address of the next Node in thelist
} Record *pFirst, *pTemp, *pLast;
Main Menu:
1- Enter New Record
2- Delete a Record
3- Search a Record
4- Exist Application:
---------------------------
Enter Your Choice (1/2/3/4)? 1
Enter CNIC: 11111-1111111-1
Enter Name: john
Enter Address: h#10 ,street no...
Enter Telephone: 99885445
Are You Sure to save Record (Y/N) Y
Record Saved!
Press any key to continue….
(After user presses any key, the screen will be cleared and themain menu will appeared)
Main Menu:
1- Enter New Record
2- Delete a Record
3- Search a Record
4- Exist Application:
---------------------------
Enter Your Choice (1/2/3/4)? 2
Enter CNIC: 11111-1111111-1
Are You sure to delete this record (Y/N) Y
Record Deleted!
Press any key to continue…
(After user presses any key, the screen will be cleared and themain menu will appeared)
Main Menu:
1- Enter New Record
2- Delete a Record
3- Search a Record
4- Exist Application:
---------------------------
Enter Your Choice (1/2/3/4)? 3
Enter CNIC: 11111-1111111-1
Enter Name: john
Enter Address: h#10 ,street no...
Enter Telephone: 99885445
Press any key to continue…
(After user presses any key, the screen will be cleared and themain menu will appeared)
Main Menu:
1- Enter New Record
2- Delete a Record
3- Search a Record
4- Exist Application:
---------------------------
Enter Your Choice (1/2/3/4)? 4
Are you sure to exit (Y/N) Y
At any prompt message if user presses the key “N”,the Screen must be cleared and the main menu should bedisplayed
You have successfully quitted.
Explanation / Answer
you are required to develop an application for maintaining atelephone directory.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.