Command Line Interface to manage a contact list
- Show all your contacts
- Add a new contact
- Search a contact by their name
- Delete an existing contact
- Keep data inside a contacts.txt
- Format the phone numbers using dashes
- Allow formatting phone numbers with different lengths
- Warn user when entering duplicate contact... provide a (Y/N) response
- Keep columns equally spaced
- Add or trim spaces as needed
- Include email
- Email verification check: 1 @ and ".com", ".edu", or ".mil"
- Allow contact modifications
- [] Add Sort and run it alphabetize contact.txt by last name
- The text file should contain one contact per line
- When the application starts, the contact list should be read from the file.
- Before the application exits, the contacts file should be rewritten.
-
Contact Text: key, name (first & last), phone, email
-
Contact class:
Fields: (key, fName, lName, phone, email)
Methods: (set, get)
Description: At the moment, we do not need contact objects. This could be used later if the scope of the project demands it. -
ContactManager class:
Fields: (filename, directory, fileData, directoryPath, filePath)
Methods: (create, read, update, delete, saveFile)
Description: Manages CRUD data between application and data file -
ContactPrograms:
Fields: (ContactManger[inst], Input[inst])
Methods: (readAll, findContact, checkContact, modContact; sortContacts; deleteContact)
Description: Combines cm crud functions into larger programs the user selects within the ca menus -
ContactApplication:
Fields: (FIELDS)
Methods: (readAll, findContact, checkContact, modContact; sortContacts; deleteContact)
Description: Provides user with menus, calls program according to user selection, includes overall application run and terminate function -
UI: Input:
Fields: (FIELDS)
Methods: (getString, getPhone, getEmail, checkName, checkPhone, checkEmail)
Description: Manages user inputs, checks for errors