Time to put your knowledge of Lists to work! You'll build a simple contact manager that lets users add names and phone numbers, then look them up by name.
YOUR TASK
Create a program that:
Stores contacts using a List<string>
Accepts the command ADD name number to add a contact
Accepts the command FIND name to search for a contact
Accepts LIST to show all contacts
Accepts QUIT to exit
Need a hint?
Approach:
1. Use List<string> contacts = new List<string>();
2. Use while(true) with a Console.ReadLine() loop
3. Split input: string[] parts = input.Split(' ');
4. Use contacts.Add(...) and loop to search
5. Break on QUIT
Example interaction (input: ADD Alice 555-1234 then LIST then QUIT):
ADD Alice 555-1234
Contact added.
LIST
Alice - 555-1234
QUIT
Goodbye!
Code Editor
Ready
Output
Console
Console initialized...
Ready for Project 1: Contact Manager
> Test your code with the "Check My Code" button
> When it passes, the Complete button will activate!