Your instructor should provide a CSV file named contacts.csv. When the program starts, it should read
Question:
Your instructor should provide a CSV file named contacts.csv.
When the program starts, it should read the contacts from the CSV file.
For the view and del commands, display an error message if the user enters an invalid contact number.
When you add or delete a contact, the change should be saved to the CSV file immediately.
That way, no changes are lost, even if the program crashes later.
COMMAND MENU
list - Display all contacts
view - View a contact
add - Add a contact
del - Delete a contact
exit - Exit program
Command: list
1. Guido van Rossum
2. Eric Idle
Command: view
Number: 2
Name: Eric Idle
Email: e..c@ericidle.com
Phone: +44 20 7946 0958
Command: add
Name: Mike Murach
Email: m..e@murach.com
Phone: 559-123-4567
Mike Murach was added.
Command: list
1. Guido van Rossum
2. Eric Idle
3. Mike Murach
Command: exit
Bye!
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell