![]() |
|
#1
|
|||
|
|||
I need C++ code for this one..Description of problem
We want to create a program which will function as telephone list. The program is supposed to store subscribers of telephone company with certain elements for each one as: ? Name ? Surname ? Age ? Number of telephone LEG A (2 units) The user through menoy' choices will have the following possibilities: 1. Import of new subscriber With this choice the program will ask from the user the elements of new subscriber and then him it will store in suitable structure in this memory of computer (in phase will not become storage in file). Eg Menu 1. Insert new subscriber 2. Find subscriber 3. Show complete phonebook 4. Save phonebook 5. Load phonebook 6. Quit program Your choice:1 Give first name: Dimitris Give last name: Vrakas Give age: 29 Give phone number: 6912345678 Subscriber added successfully 2. Search of subscriber With this choice the user types the subscriber's surname and the program it will seek registrations with this surname. If they are not found then it will print one suitable message, while in opposite case it presents completed the elements of subscribers that found to one and it will give in the user the possibility of modification or deletion elements. Eg Your choice:2 Give last name: Papadopoulos No subscriber found ... ... Your choice:2 Give last name: Vrakas First name: Kostas Last name: Vrakas Age: 49 Phone number: 6987654321 Press m modify subscriber, d delete, q to return to main menu or any other key to proceed to next subscriber:a First name: Dimitris Last name: Vrakas Age: 29 Phone number: 6912345678 Press m modify subscriber, d delete, q to return to main menu or any other key to proceed to next subscriber:m Give first name: Dimitrios Give last name: Vrakas Give age: 29 Give phone number: 6912345678 Subscriber modified successfully ... Your choice:2 Give last name: Vrakas First name: Kostas Last name: Vrakas Age: 49 Phone number: 6987654321 Press m modify subscriber, d delete, q to return to main menu or any other key to proceed to next subscriber:d Are you sure (y/n): y Subscriber deleted! 3. Appearance of telephone list With this choice the program will present in columns all the registrations of telephone list in 20ades. Each time there will be presented 20 registrations and will fill the page, program asks the user if he wants to continue or return in menu's choices. Eg Your choice:3 Record First name Last name Age Phone number ---------------------------------------------------------- 1 Kostas Vrakas 49.6987654321 2 James Bond 40.6999999999 ..... 20 Denzel Washington 43.6900000000 Press q to return to main menu or any other key to proceed to next page: a 4. Storage of list in file The user will give the name file and the program will store all the registrations in in this file. P.h. Your choice:4 Give filename: myphonebook.dat ` myphonebook.dat' saved successfully! 5. Recuperation of list from file The user will give the name file and the program will open the file and will charge in the memory all the registrations by this file. P.h. Your choice:5 Give filename: myphonebook.dat ` myphonebook.dat' loaded successfully! 6. Exit from the program P.h. Your choice:6 Goodbye! Thus when the program begins no subscriber will be registered even if if the user had registered others previously.it should ask first recuperation of list, select the file in which it had stored the elements and in it possesses those that are charged in the program. The program is supposed to maintain the registrations in a connected list categorized as for surname of subscriber. Thus, each time where the user asks import will be supposed as the new node shoyld be added in the suitable place in the list depending on the surname. Also the search it exploits the make that the registrations are categorized what for example, do not examine all the registrations in order to it finds a surname which does not exist. In order to accelerate the search of subscribers In addition to the list a tree with height 3 in which in each node will exist 26 indicators to his nodes next level of tree, that will correspond in the 26 letters of Latin alphabet needs to be created. Thus the node in the first level will check the first letter of surname of subscriber, the nodes the second level the second letter and the nodes of third level the third letter respectively. With ayto'.ton the way when the user pliktrologi'sej a surname, the program will check the first letter and will follow the equivalent from the 26 indicators of first node. In continuity will check the second letter and will follow the corresponding indicator of his node second level in that they was found. In the third level it will check the third letter and it again follows one from the 26 indicators which however will show in her first registration connected list in which his eponymous subscriber it begins from the three letters. The structure of that is to say will be form: a b c ... z aa ab ac ... az ba bb bc ... bz baa bab bac ... baz please forgive my english!!! |
|
#2
|
|||
|
|||
Re: I need C++ code for this one..Quote:
Do you have a question about something that someone could help you with? What kind of help do you desire? "I need c++ code" isn't really a question, is it? Regards, Dave |
|
#3
|
||||
|
||||
Re: I need C++ code for this one..Senior members might not reply to this thread if you:
We encourage you to post again once you've done that. __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Formatting C / C++ code | WaltP | C Programming Language | 1 | 07-Jan-2008 00:59 |
| Here it is again! 35% - 40% off For Life! | my-e-space | Web Hosting Advertisements & Offers | 0 | 20-Apr-2006 15:48 |
| functions seems not to exit from a certain code block | jaro | C Programming Language | 3 | 22-Mar-2006 00:08 |
| Guidelines for posting requests for help - UPDATED! | WaltP | C++ Forum | 0 | 21-Apr-2005 03:44 |
| Problem with int mixed with char,... | leitz | C++ Forum | 17 | 07-Dec-2004 21:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The