Professional Documents
Culture Documents
Project DOC 2023
Project DOC 2023
(Session 2022-2024)
Submitted By
NAME Mursal bajwa, Huzaifa Azeem, Shakeel ur Rehman
Roll No 22-cs-420, 22-cs-438, 22-cs-426
Supervisor Name
Mam Amna Wajid
_____________________________________________________________________________________________
1|P age
c Project Title
(Elbert Hubbard)
2|P age
c Project Title
Table of Contents
Introduction ............................................................................................................................................ 13
1.1 Overview ........................................................................................................................................ 13
1.2 Motivation ..................................................................................................................................... 13
Literature Survey................................................................................................................................... 21
3.1 ........................................................................................................................................................... 21
Problem Statement ............................................................................................................................... 35
4.1Scope ................................................................................................................................................ 35
4.2 Assumptions and Dependencies............................................................................................ 37
4.3 General Constraints ................................................................................................................... 37
Solution and Project Design............................................................................................................... 38
5.1 System Architecture................................................................................................................... 38
5.2 Proposed Solution ...................................................................................................................... 39
5.3 Class Diagram of System.......................................................................................................... .55
Project Implementation ...................................................................................................................... 56
6.1 Screen shots of Project ............................................................................................................. .56
Results ....................................................................................................................................................... 64
8.1 Results ............................................................................................................................................ 64
8.2 Suggestions ................................................................................................................................... 64
Conclusion ................................................................................................................................................ 65
Future Recommendations .................................................................................................................. 66
References................................................................................................................................................ 67
Appendices............................................................................................................................................... 69
3|P age
c Project Title
List of Figures
4|P age
c Project Title
5|P age
c Project Title
Chapter 1
Introduction
1.1 Overview:
SUMMARY :
The Contact Management System is designed to organize and manage contacts
efficiently. It utilizes classes and methods to perform operations such as insertion,
deletion, searching, and editing of contacts. This documentation outlines the
structure, functionalities, and purpose of the code. The Contact Management System
is a console-based application written in C++ to manage and organize contacts. It
allows users to add, delete, search, edit, and display contacts. The system supports
storing contacts in different categories, such as family, work, and friends. Contacts
are sorted alphabetically by name for efficient retrieval.
Motivation for the Dynamic Contact Management System Project: In our rapidly
evolving digital age, the ability to manage contacts efficiently has become more
critical than ever. The motivation behind embarking on the development of a
Dynamic Contact Management System using linked lists stems from the need to
address the challenges and complexities that users face in organizing and accessing
their contact information. Here are key motivating factors driving this project: Ever-
Growing Digital Landscape: As the digital landscape continues to expand, individuals
and organizations are accumulating a vast amount of contact information. Managing
this growing dataset necessitates a dynamic and efficient solution. User Convenience
and Experience: Users increasingly demand seamless experiences when dealing with
their contacts. This project aims to provide a user-friendly interface that streamlines
the process of adding, deleting, searching, displaying, and modifying contacts,
enhancing overall user satisfaction. Memory Efficiency with Linked Lists: Leveraging
the dynamic nature of linked lists ensures that the contact management system is not
only effective but also memory-efficient. This is crucial, especially when dealing with
large datasets and frequent operations. Data Integrity and Accuracy: The project's
focus on avoiding duplicate entries ensures that the contact information remains
accurate and reliable. Maintaining data integrity is a fundamental aspect of effective
contact management, and the system is designed to uphold this standard.
Adaptability to Diverse Needs: The inclusion of features such as managing multiple
contact lists and implementing sorting algorithms caters to the diverse organizational
and personal needs of users. The project recognizes the importance of adaptability in
6|P age
c Project Title
Chapter 3
Problem statement :
Project Proposal:
Dynamic Contact Management System using Linked Lists I. Introduction In the contemporary
digital landscape, efficient contact management is essential. This project aims to develop a
Dynamic Contact Management System using linked lists, enabling users to add, delete,
search, display, and modify contacts seamlessly. The project focuses on utilizing the dynamic
nature of linked lists for memory-efficient operations.
Allowing users to manage multiple contact lists independently. Sorting: Implementing sorting
algorithms for alphabetical ordering of contacts. User Interface: Creation of a user-friendly
interface to enhance user experience.
8|P age
c Project Title
9|P age
c Project Title
Chapter 4
4.1 .Scope
Data Structure Utilizes singly linked lists for storing contacts,
optimizing insertion and deletion operations.
Algorithms Implements algorithms for insertion, deletion, and
searching to handle large datasets effectively.
The scope of the Contact Management System includes
managing contacts in different categories, performing CRUD
operations, and persisting data to files. The system provides a
user-friendly interface for effective contact management.
4.2 Assumptions and Dependencies:
1.1 - The program assumes that the user will provide valid inputs
during operations.
1.2 - Dependencies include the file I/O
operations for saving and loading contact
data.
4.3 General Constraints:
10 | P a g e
c Project Title
*****************************************************
11 | P a g e
c Project Title
Chapter 5
`contact` Class
- Represents an individual contact within the system.
`contactbook` Class
- Manages a collection of contacts, organized into linked lists for
different contact categories (Family, Friends, Work).
- Data members:
- `firstcontact`: A pointer to the first contact in the linked list.
- `read` and `write`: File stream objects for reading from and
writing to files.
`main` Function
- Acts as the entry point of the program.
14 | P a g e
c Project Title
User Interface
- The user interface is implemented through console interactions,
allowing users to choose contact book categories and perform
operations.
```
+----------------+ +------------------+
+----------------+ +------------------+
| - firstcontact | | - name |
| - read | | - number |
| - write | | - next |
+----------------+ +------------------+
```
The `contactbook` class has associations with the `contact` class, indicating that it manages a
collection of contacts.
In summary, the proposed solution leverages linked lists for efficient contact organization
and file I/O for data persistence. The user interface provides a simple yet effective way for
15 | P a g e
c Project Title
Chapter 6
Project Implementation
Screenshots play a crucial role in providing a visual representation of the project's implementation. They serve as
documentation to illustrate the working of the system and can be included to enhance understanding. In the case of the
Contact Management System, capturing key moments of the program's execution through screenshots is beneficial.
Below are the recommended areas to capture:
Contact Insertion
Capture the interaction when a user inserts a new contact. This should display the
input prompts for name and number, followed by a confirmation or error message.
Example:
16 | P a g e
c Project Title
Contact Deletion
Showcase the process of deleting a contact, including the input for the contact's
name or number and the resulting confirmation or error message. Example:
17 | P a g e
c Project Title
Contact Search
Include screenshots demonstrating the search functionality, where users input a name or number,
and the system displays the corresponding contact details or a relevant message. Example:
Contact Editing
Capture the interaction when a user chooses to edit a contact. Display the options for
editing (name or number) and the subsequent input and confirmation messages.
Example:
Displaying Contacts
Include a screenshot showing the display of contacts, illustrating how the system presents the stored contact
information to the user. Example:
18 | P a g e
c Project Title
Including these screenshots in the documentation adds a visual component to the project, aiding in a more
comprehensive understanding of the Contact Management System's functionality. Each screenshot should be
accompanied by explanatory captions to provide context and guide the reader through the user interactions.
Chapter no 8
19 | P a g e
c Project Title
Results
Results
While the system demonstrates success in its current state, there are areas
where enhancements can be considered for further improvement:
**Suggestions:**
- Validate user inputs for both name and number fields to ensure they
meet required criteria (e.g., length, character types).
- Implement error messages or prompts to guide users when invalid
inputs are detected.
- Consider adding additional safeguards to prevent potential issues
arising from incorrect inputs.
20 | P a g e
c Project Title
**Example:**
If a user enters a name with special characters or a phone number in an
incorrect format, the system should provide a clear error message guiding
the user to input valid data.
Consider Implementing a Graphical User
Interface (GUI)
**Description:**
To enhance user interaction and provide a more intuitive experience,
consider transitioning from a console-based interface to a Graphical User
Interface (GUI). A GUI can improve usability and make the system more
accessible to users who may not be familiar with command-line
interfaces.
**Suggestions:**
- Utilize GUI frameworks or libraries (e.g., Qt, Tkinter) to design an
interface with buttons, input fields, and visual feedback.
- Implement a menu-driven system within the GUI for users to navigate
and interact with the system seamlessly.
**Example:**
Instead of relying on command-line inputs, users can perform operations
by clicking buttons and entering data in a visually appealing GUI. This
can lead to a more user-friendly experience and broaden the system's
appeal.
Chapter 9
22 | P a g e
c Project Title
Functional Solution:
23 | P a g e
c Project Title
**User-Friendly Interface:**
- The system prioritizes user-friendliness, featuring an interface that is
intuitive and easy to navigate. The straightforward design ensures that
users, regardless of their technical expertise, can leverage the system
efficiently. This accessibility is crucial for a tool intended for a broad user
base.
Looking Ahead:
24 | P a g e
c Project Title
25 | P a g e
c Project Title
Appendices
AppendixA
Overview
Purpose of Appendices
26 | P a g e
c Project Title
2. **Code Samples:**
3. **Additional Diagrams:**
4. **Project Artifacts:**
27 | P a g e
c Project Title
not be crucial for the primary narrative but can add value to readers
seeking a more comprehensive understanding of the project.
28 | P a g e
c Project Title
Program code.
#include <iostream>
#include <string>
#include <stack>
#include <fstream>
class contact
public:
string name;
string number;
contact* next;
contact()
next = NULL;
29 | P a g e
c Project Title
};
class contactbook
contact* firstcontact;
ifstream read;
ofstream write;
public:
contactbook()
firstcontact = NULL;
if (passedname == contactbookname)
return 2;
30 | P a g e
c Project Title
if (i < contactbookname.length())
return true;
else
return false;
return false;
else
31 | P a g e
c Project Title
if (i < passedname.length())
return true;
else
return false;
return true;
temp = temp->next;
32 | P a g e
c Project Title
if (temp != NULL)
return;
else
newcontact->name = Name;
newcontact->number = Number;
newcontact->next = firstcontact;
firstcontact = newcontact;
else {
prev = current;
current = current->next;
33 | P a g e
c Project Title
newcontact->next = current;
prev->next = newcontact;
if (firstcontact == NULL)
else
delete firstcontact;
firstcontact = NULL;
else
if (firstcontact->name == Name)
34 | P a g e
c Project Title
firstcontact = firstcontact->next;
delete del;
else
prev = temp;
temp = temp->next;
prev->next = temp->next;
delete temp;
else
cout << "the Name is not found in the contactbook!" << endl;
35 | P a g e
c Project Title
if (firstcontact == NULL)
else
delete firstcontact;
firstcontact = NULL;
else
if (firstcontact->number == Number)
firstcontact = firstcontact->next;
delete del;
else
36 | P a g e
c Project Title
prev = temp;
temp = temp->next;
prev->next = temp->next;
delete temp;
else
cout << "the Name is not found in the contactbook!" << endl;
37 | P a g e
c Project Title
temp = temp->next;
if (temp!=NULL&&temp->name== Name)
else
cout << "the Name is not found in the contactbook!" << endl;
38 | P a g e
c Project Title
temp = temp->next;
else
cout << "the Number is not found in the contactbook!" << endl;
temp = temp->next;
39 | P a g e
c Project Title
int c;
cin >> c;
if (c == 1)
string name;
deletionbyname(Name);
insertSorted(name, number);
else
if (c == 2)
string number;
deletionbyname(Name);
40 | P a g e
c Project Title
insertSorted(name, number);
else
cout << "the Name is not found in the contactbook!" << endl;
void display()
if (firstcontact == NULL)
else
41 | P a g e
c Project Title
temp = temp->next;
write.open(filename);
if (!write.is_open()) {
return;
write << temp->name << " "<< temp->number << " "<<endl;
temp = temp->next;
write.close();
42 | P a g e
c Project Title
read.open(filename);
if (!read.is_open()) {
return;
while (read>>name>>number) {
insertSorted(name, number);
read.close();
~contactbook()
43 | P a g e
c Project Title
};
int main()
contactbook Family;
contactbook Friend;
contactbook work;
string name;
string number;
char decision;
int selection=0;
int choice = 0;
do {
system("cls");
if (selection == 1)
Family.reader("Familycontact");
44 | P a g e
c Project Title
system("cls");
switch (choice)
case 1:
Family.insertSorted(name,number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 2:
45 | P a g e
c Project Title
Family.deletionbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 3:
Family.deletionbynumber(number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 4:
Family.searchbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 5:
Family.searchbynumber(number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 6:
Family.Edit(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 7:
Family.display();
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 8:
char c;
cout << "Do you want to save?Press y(yes) & prss n(no)\n";
if (c == 'y')
Family.writer("Familycontact");
47 | P a g e
c Project Title
decision = 'n';
break;
default:
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
else
if (selection == 2)
Friend.reader("Friendscontact");
48 | P a g e
c Project Title
system("cls");
switch (choice)
case 1:
Friend.insertSorted(name, number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 2:
Friend.deletionbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
49 | P a g e
c Project Title
case 3:
Friend.deletionbynumber(number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 4:
Friend.searchbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 5:
Friend.searchbynumber(number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 6:
50 | P a g e
c Project Title
Friend.Edit(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 7:
Friend.display();
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 8:
char c;
cout << "Do you want to save?Press y(yes) & prss n(no)\n";
if (c == 'y')
Friend.writer("Friendscontact");
decision = 'n';
break;
default:
51 | P a g e
c Project Title
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
else
if (selection == 3)
work.reader("Workcontact");
system("cls");
52 | P a g e
c Project Title
switch (choice)
case 1:
work.insertSorted(name, number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 2:
work.deletionbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 3:
work.deletionbynumber(number);
53 | P a g e
c Project Title
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 4:
work.searchbyname(name);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 5:
work.searchbynumber(number);
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 6:
work.Edit(name);
54 | P a g e
c Project Title
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 7:
work.display();
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
break;
case 8:
char c;
cout << "Do you want to save?Press y(yes) & prss n(no)\n";
if (c == 'y')
work.writer("Workcontact");
decision = 'n';
break;
default:
55 | P a g e
c Project Title
cout << "If you want to go on the main menu press y(yes):\nIf you want to Exit the
process press n(no):\n";
else
if (selection == 4)
decision = 'n';
else
56 | P a g e