Assignment 6-A

Contact Manager

Build a feature-rich contact manager application using STL containers, iterators, algorithms, and lambda expressions for powerful data manipulation.

6-8 hours
Intermediate
225 Points
Submit Assignment
What You'll Practice
  • STL containers (vector, map, set)
  • Iterators for traversal
  • STL algorithms (sort, find, etc)
  • Lambda expressions
  • Custom comparators
01

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

02

Requirements

1
Contact Structure

Name, email, vector<string> for phone numbers, set<string> for groups/tags.

2
Storage with Map

Use map<string, Contact> with name as key. Also maintain multimap for group-based lookup.

3
STL Algorithms

Use find_if, sort, count_if, transform with lambda predicates for searching and filtering.

4
Features

Add/edit/delete contacts, search by name/phone/group, sort by different fields, export filtered results.

5
Lambda Expressions

Use lambdas for custom sorting, filtering (e.g., contacts in multiple groups), and transformations.

03

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
04

Grading Rubric

CriteriaPoints
Contact class with STL members35
Container usage (map, multimap, set)50
STL Algorithm implementation45
Lambda expressions40
Iterator usage25
Code Quality & Documentation30
Total225