A simple command-line Contact Book written in Java to showcase OOP concepts like encapsulation, abstraction, and modularity.
- β Add new contacts
- β View all contacts (sorted alphabetically)
- β Search contact by name
- β Update contact (name, phone, email)
- β Delete contact by name
- β
Export contacts to
contacts.txt - β Handles invalid user input gracefully (e.g., entering strings for menu options)
- Encapsulation β Private fields and public getters/setters in
Contact.java - Abstraction β Logical separation of responsibilities into methods
- Modularity β Clean separation of classes and methods
- Collections β Used
ArrayListandIteratorfor managing contacts - Stream API β Used to perform checks like duplicate names
ContactBook/
βββ src/
β βββ Contact.java // Contact model class
β βββ ContactBook.java // Main app logic
βββ contacts.txt // (Generated after exporting)