0% found this document useful (0 votes)
17 views13 pages

Final Report

hf

Uploaded by

paunikarkedar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views13 pages

Final Report

hf

Uploaded by

paunikarkedar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

‭PROJECT BASED LEARNING‬‭​‬

‭ON​‬
‭"Contact Management System"‬‭​‬

‭DEPARTMENT OF MCA FIRST YEAR‬


‭YEAR 2024 - 2025​‬
‭​‬PROJECT BASED LEARNING‬‭​‬
‭ON‬

‭"Contact Management System"‬‭​‬

‭Submitted by‬‭​‬

‭KEDAR SHRIRAM PAUNIKAR (MC24-68)​‬


‭KUMAR SUNIL RANDHIR (MC24-69)​‬
‭INDEX‬

‭Project Report: Contact Management System using Python‬

‭1. Introduction‬ ‭‬
4
‭1.1 Project Overview‬ ‭4‬
‭1.2 Objectives‬ ‭4‬

‭2. System Design‬ ‭‬


4
‭2.1 Functional Requirements‬ ‭4‬
‭2.2 Non-Functional Requirements‬ ‭5‬
‭2.3 System Architecture‬ ‭5‬

‭3. Implementation‬ ‭‬
5
‭3.1 Contact Class‬ ‭5‬
‭3.2 ContactManager Class‬ ‭5‬
‭3.3 Main Program (CLI)‬ ‭6‬

‭4. Testing and Validation‬ ‭‬


8
‭4.1 Test Cases‬ ‭8‬
‭4.2 User Feedback‬ ‭9‬

‭5. Conclusion‬ ‭9‬

‭6. Future Enhancements‬ ‭9‬


‭ roject Report: Contact Management‬
P
‭System using Python‬

‭Abstract‬
‭ n a daily basis, everyone depends on a lot of contacts which cannot be‬
O
‭remembered so easily as it’s tough to do so. Hence dependability increases on‬
‭phones. What will be the situation if our phone is lost and we do not easily‬
‭remember our contacts and other important stuff? Idea is to come up with an app‬
‭which will be a partial remedy to the phone. So let us try an app which will allow‬
‭saving info like Last Name, First name, Middle name, Phone number, email id,‬
‭upload pic etc.‬

I‭t will be multi user application secured as personal data and saved contact‬
‭details will not be accessible to other users. The other option will be like save‬
‭notes which will allow user type down anything which can be kept as an info‬
‭related to passwords or info related to business deals, or info related to id’s or‬
‭ticket numbers etc.‬
‭1. Introduction‬
‭1.1 Project Overview‬
‭ he‬‭Contact Management System‬‭is a Python-based application designed to‬
T
‭store, manage, and organize contact details. The system allows users to perform‬
‭various operations like adding new contacts, updating existing contacts, deleting‬
‭contacts, and searching for specific contacts. This system is designed to be‬
‭simple, user-friendly, and efficient for managing a large number of contacts in a‬
‭local database.‬

‭ he project utilizes Python and provides an intuitive interface for interacting with‬
T
‭contact data. It can be run in a console-based environment and can be extended‬
‭with features like data persistence using databases, advanced searching‬
‭algorithms, and enhanced user interfaces.‬

‭1.2 Objectives‬
‭●‬ T ‭ o design a system that allows users to easily manage and store contact‬
‭details.‬
‭●‬ ‭To implement basic functionalities such as adding, updating, deleting, and‬
‭viewing contacts.‬
‭●‬ ‭To ensure that the system is easy to use, efficient, and fast in processing‬
‭the data.‬
‭●‬ ‭To practice Python programming and object-oriented concepts by‬
‭implementing a simple management system.‬
‭2. System Design‬
‭2.1 Functional Requirements‬
‭The system should support the following functionalities:‬

‭●‬ A ‭ dd Contact‬‭: Add a new contact with fields like name, phone number,‬
‭email, address, and others.‬
‭●‬ ‭View Contact‬‭: Display the list of all contacts.‬
‭●‬ ‭Update Contact‬‭: Modify the details of an existing contact.‬
‭●‬ ‭Delete Contact‬‭: Remove a contact from the system.‬
‭●‬ ‭Search Contact‬‭: Find a contact by their name, phone number, or email.‬
‭●‬ ‭Sort Contacts‬‭: Sort the contacts based on any field (e.g., name or phone‬
‭number).‬
‭●‬ ‭Exit‬‭: Close the program and save the contact list (if applicable).‬

‭2.2 Non-Functional Requirements‬


‭●‬ E ‭ fficiency‬‭: The system should be able to handle a large number of‬
‭contacts efficiently.‬
‭●‬ ‭Usability‬‭: The system should be simple and intuitive for the user to‬
‭operate.‬
‭●‬ ‭Extensibility‬‭: The system should allow easy integration of new features,‬
‭such as saving to a file, implementing a GUI, or connecting to a database.‬

‭2.3 System Architecture‬


‭ he application follows a‬‭command-line interface‬‭(CLI) design and operates as‬
T
‭a‬‭single-module program‬‭. The components are organized as follows:‬

‭‬ C
● ‭ ontact Class‬‭: This class stores the details of each contact.‬
‭●‬ ‭ContactManager Class‬‭: This class manages the list of contacts and‬
‭implements operations like add, update, delete, etc.‬
‭●‬ ‭Main Program‬‭: This component handles user input and invokes relevant‬
ContactManager‬‭class.‬
‭methods in the‬‭
‭3. Implementation‬
‭3.1 Contact Class‬
‭ his class represents a contact's information, including their name, phone‬
T
‭number, email, and address.‬

‭class Contact:‬
‭def __init__(self, name, phone, email, address):‬
‭self.name = name‬
‭self.phone = phone‬
‭self.email = email‬
‭self.address = address‬

‭def __str__(self):‬
‭return f"Name: {self.name}, Phone: {self.phone}, Email: {self.email},‬
‭ ddress: {self.address}"‬
A

‭3.2 ContactManager Class‬


‭ his class manages a list of contacts and supports operations like adding,‬
T
‭removing, updating, and searching.‬

‭class ContactManager:‬
‭def __init__(self):‬
‭self.contacts = []‬

‭def add_contact(self, contact):‬


‭self.contacts.append(contact)‬

‭def remove_contact(self, name):‬


‭self.contacts = [contact for contact in self.contacts if contact.name != name]‬

‭def update_contact(self, old_name, new_contact):‬


‭for idx, contact in enumerate(self.contacts):‬
‭if contact.name == old_name:‬
‭ elf.contacts[idx] = new_contact‬
s
‭break‬

‭def search_contact(self, search_term):‬


‭found_contacts = [contact for contact in self.contacts if search_term.lower()‬
‭in contact.name.lower() or‬
‭search_term.lower() in contact.phone.lower() or‬
‭search_term.lower() in contact.email.lower()]‬
‭return found_contacts‬

‭def display_contacts(self):‬
‭if not self.contacts:‬
‭print("No contacts available.")‬
‭else:‬
‭for contact in self.contacts:‬
‭print(contact)‬

‭def sort_contacts(self, key):‬


‭self.contacts.sort(key=lambda contact: getattr(contact, key))‬

‭3.3 Main Program (CLI)‬


‭ he main program prompts the user for input and invokes the appropriate‬
T
ContactManager‬
‭methods of‬‭ ‭.‬

‭def main():‬
‭contact_manager = ContactManager()‬

‭while True:‬
‭print("\n1. Add Contact")‬
‭print("2. View Contacts")‬
‭print("3. Update Contact")‬
‭print("4. Delete Contact")‬
‭print("5. Search Contact")‬
‭print("6. Sort Contacts")‬
‭print("7. Exit")‬
‭choice = input("Choose an option: ")‬

‭if choice == '1':‬


‭name = input("Enter Name: ")‬
‭phone = input("Enter Phone: ")‬
‭email = input("Enter Email: ")‬
‭address = input("Enter Address: ")‬
‭contact = Contact(name, phone, email, address)‬
‭contact_manager.add_contact(contact)‬

‭elif choice == '2':‬


‭contact_manager.display_contacts()‬

‭elif choice == '3':‬


‭old_name = input("Enter the name of the contact to update: ")‬
‭name = input("Enter new Name: ")‬
‭phone = input("Enter new Phone: ")‬
‭email = input("Enter new Email: ")‬
‭address = input("Enter new Address: ")‬
‭new_contact = Contact(name, phone, email, address)‬
‭contact_manager.update_contact(old_name, new_contact)‬

‭elif choice == '4':‬


‭name = input("Enter the name of the contact to delete: ")‬
‭contact_manager.remove_contact(name)‬

‭elif choice == '5':‬


‭search_term = input("Enter search term (name, phone, or email): ")‬
‭results = contact_manager.search_contact(search_term)‬
‭if results:‬
‭for contact in results:‬
‭print(contact)‬
‭else:‬
‭print("No matching contacts found.")‬

‭elif choice == '6':‬


‭key = input("Sort by (name/phone/email): ")‬
‭if key in ['name', 'phone', 'email']:‬
‭contact_manager.sort_contacts(key)‬
‭contact_manager.display_contacts()‬
‭else:‬
‭print("Invalid sort key.")‬

‭elif choice == '7':‬


‭print("Exiting...")‬
‭break‬

‭else:‬
‭print("Invalid choice. Please try again.")‬

‭if __name__ == "__main__":‬


‭main()‬
‭4. Testing and Validation‬
‭4.1 Test Cases‬
‭●‬ ‭Add Contact‬‭:‬

‭○‬ I‭nput: Name = "John Doe", Phone = "1234567890", Email =‬


‭"[email protected]", Address = "123 Elm St"‬
‭○‬ ‭Expected Output: Contact added successfully, and it should be‬
‭displayed in the contact list.‬
‭‬ V
● ‭ iew Contacts‬‭:‬

‭ ‬ ‭Input: No input required‬



‭○‬ ‭Expected Output: Displays all the added contacts.‬
‭ ‬ ‭Update Contact‬‭:‬

‭○‬ I‭nput: Old Name = "John Doe", New Name = "Jane Doe", Phone =‬
‭"9876543210"‬
‭○‬ ‭Expected Output: Contact details should be updated.‬
‭‬ D
● ‭ elete Contact‬‭:‬

‭ ‬ ‭Input: Name = "Jane Doe"‬



‭○‬ ‭Expected Output: Contact should be removed from the list.‬
‭ ‬ ‭Search Contact‬‭:‬

‭ ‬ ‭Input: Search Term = "Doe"‬



‭○‬ ‭Expected Output: Display contacts matching the search term.‬
‭ ‬ ‭Sort Contacts‬‭:‬

‭ ‬ I‭nput: Sort by = "name"‬



‭○‬ ‭Expected Output: Contacts should be sorted by name.‬

‭4.2 User Feedback‬


‭ fter performing tests with different user inputs, the system works as expected,‬
A
‭providing the required functionalities efficiently.‬
‭5. Conclusion‬
‭ he‬‭Contact Management System‬‭provides a simple and effective way to‬
T
‭manage contacts in a local Python environment. With basic functionalities such‬
‭as adding, updating, deleting, searching, and sorting contacts, it offers a clean‬
‭interface for the user to interact with contact data. The system can be further‬
‭improved by integrating file storage (e.g., saving contacts to a file or using a‬
‭database), adding exception handling, and improving the user interface (e.g.,‬
‭creating a GUI using Tkinter or integrating with a web framework).‬

‭ he‬‭Contact Management System‬‭provides a straightforward‬‭and efficient way‬


T
‭to manage contacts within a local Python environment. It offers essential features‬
‭such as adding, updating, deleting, searching, and sorting contacts, all through a‬
‭simple command-line interface. These functionalities ensure that users can easily‬
‭store, retrieve, and organize their contact information. The clean, minimal‬
‭interface makes the system accessible even for those with basic programming‬
‭knowledge.‬

‭ he system's‬‭user interface‬‭could also be upgraded. A‬‭Graphical User‬


T
‭Interface (GUI)‬‭using Tkinter or PyQt would make the‬‭system more intuitive,‬
‭especially for users unfamiliar with the command line. Alternatively, integrating a‬
‭web interface‬‭via frameworks like Flask or Django‬‭could provide even greater‬
‭flexibility and accessibility. These improvements would elevate the system’s‬
‭functionality, making it more reliable and user-friendly.‬
‭6. Future Enhancements‬
‭Future Enhancements‬

‭1.‬ ‭Data Persistence‬‭:‬


‭To ensure contacts are saved across sessions, data persistence is crucial.‬
‭This can be achieved by integrating databases like‬‭SQLite‬‭or‬‭MySQL‬‭,‬
‭which would store contacts in tables, allowing users to retain their data‬
‭even after the application is closed. Alternatively, contact data can be‬
‭saved to text files (e.g., CSV, JSON) for simpler implementations. This‬
‭would allow users to import and export contact information, improving the‬
‭system's functionality.‬

‭2.‬ ‭Graphical User Interface (GUI)‬‭:‬


‭A‬‭Graphical User Interface (GUI)‬‭can significantly‬‭enhance the user‬
‭experience. Using libraries like‬‭Tkinter‬‭or‬‭PyQt‬‭,‬‭a GUI could provide a‬
‭more intuitive, interactive platform for managing contacts. Instead of‬
‭relying on command-line inputs, users could add, update, delete, and‬
‭search for contacts using buttons, text fields, and dropdown menus,‬
‭making the application more accessible to non-technical users.‬

‭3.‬ ‭Advanced Searching‬‭:‬


‭To improve search functionality,‬‭advanced search‬‭filters‬‭such as‬‭partial‬
‭matching‬‭and‬‭fuzzy search‬‭could be added. This would‬‭allow users to‬
‭search for contacts even with incomplete or misspelled information,‬
‭improving the accuracy and usability of the search feature.‬

‭4.‬ ‭Backup and Restore‬‭:‬


‭Implementing a‬‭backup and restore‬‭feature would enable‬‭users to create‬
‭secure backups of their contacts, preventing data loss. Users could export‬
‭their contacts to external files and restore them when needed, ensuring‬
‭data integrity and reliability.‬

You might also like