The Ananas software house needs to release a new version of Contacts. Specifically, Contacts 10.0 must provide the user with the following features:
-
Insert new contact. Each contact is characterized by a (progressive) code, a cogno, and a name, a date of birth and a list of telephone numbers. A telephone number is instead characterized by a number and a description (e.g., mobile phone, work, home). Each contact will have one or more telephone numbers (max 10). The functionality must be implemented as follows: the program asks the user for the surname, name and date of birth; the number of telephone numbers to add to the contact; the telephone numbers to be assigned to the contact (number and description). After generating the code, the program inserts the new contact in the archive.
-
New telephone number added. The program takes the contact code as input; check its presence in the archive; if so, print the contact data on the screen and ask the user for the data of the new telephone number, i.e. number and description.
-
Search for number. The program takes the surname as input and prints all the contacts whose surname coincides with that specified in the input.
-
View address book. The program prints the entire phone book on the screen, showing the surname, first name, date of birth and the list of telephone numbers (number and description) for each contact.