Assignment Overview
Build a Contact Manager that stores contacts with multiple phone numbers, organizes by groups, provides advanced search, and uses STL for efficient operations.
Containers (6.1)
vector, map, set, multimap
Iterators (6.2)
Traversal, range-based
Algorithms (6.3)
sort, find, transform
Lambdas (6.4)
Custom predicates
Requirements
Contact Structure
Name, email, vector<string> for phone numbers, set<string> for groups/tags.
Storage with Map
Use map<string, Contact> with name as key. Also maintain multimap for group-based lookup.
STL Algorithms
Use find_if, sort, count_if, transform with lambda predicates for searching and filtering.
Features
Add/edit/delete contacts, search by name/phone/group, sort by different fields, export filtered results.
Lambda Expressions
Use lambdas for custom sorting, filtering (e.g., contacts in multiple groups), and transformations.
Submission
Required Repository Name
cpp-contact-manager
cpp-contact-manager/
├── Contact.h # Contact class
├── ContactManager.h # Manager with STL
├── ContactManager.cpp # Implementation
├── main.cpp # Main application
├── sample_output.txt # Sample run
└── README.md # Documentation
Grading Rubric
| Criteria | Points |
|---|---|
| Contact class with STL members | 35 |
| Container usage (map, multimap, set) | 50 |
| STL Algorithm implementation | 45 |
| Lambda expressions | 40 |
| Iterator usage | 25 |
| Code Quality & Documentation | 30 |
| Total | 225 |