Main

A 3 Example Session

Example session, be sure to handle invalid user inputs without crashing.

$ ./directory 

Please choose an option:
1. Insert a new entry.
2. Delete an entry.
3. Display current directory.
Option: 1
Enter a name: John Doe 
Enter a phone number: 555-241-1421

Please choose an option:
1. Insert a new entry.
2. Delete an entry.
3. Display current directory.
Option: 1
Enter a name: Mary Smith
Enter a phone number: 555-514-5151

Please choose an option:
1. Insert a new entry.
2. Delete an entry.
3. Display current directory.
Option: 3

Current directory:
1. John Doe, 555-241-1421
2. Mary Smith, 555-514-5151

Please choose an option:
1. Insert a new entry.
2. Delete an entry.
3. Display current directory.
Option: 2

Current directory:
1. John Doe, 555-241-1421
2. Mary Smith, 555-514-5151
Which entry should I delete? 2

Please choose an option:
1. Insert a new entry.
2. Delete an entry.
3. Display current directory.
Option: 3

Current directory:
1. John Doe, 555-241-1421

Green Marinee theme adapted by David Gilbert, powered by PmWiki