Lab Project Report Template - CSE
Lab Project Report Template - CSE
Student Details
Name ID
1. Sadikul Islam Adil 222902003
2.
[For Teachers use only: Don’t Write Anything inside this box]
Introduction :
In today's digital era, the management of phone records is crucial for efficient
organization and retrieval of data. The Phone Management System offers a convenient way
to store and manage phone records using a simple and user-friendly interface. It allows users
to perform common operations on the phone records, enabling efficient data manipulation
and retrieval.
Objective:
a) Efficient Data Management: The system aims to provide an organized and efficient way to
manage phone-related information. It allows users to store, retrieve, update, and delete phone
records effortlessly.
c) Data Security: The system focuses on maintaining the security of phone records. It ensures
that only authorized users can access and modify the data. It also provides options for data
backup and restoration to prevent data loss.
d) Fast and Accurate Searching: The system facilitates quick and accurate searching of
phone records based on various parameters like phone model, brand, price range, etc. This
helps users to find specific information efficiently.
c) Robust Error Handling: The system incorporates robust error handling mechanisms to
handle unexpected inputs and errors gracefully. It provides informative error messages to
guide users in case of any issues or invalid inputs
Implementation of the Project
phonebook management system :
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NAME_LENGTH 50
#define MAX_PHONE_LENGTH 20
// Function prototypes
int main()
{
PhoneBook *phoneBook = createPhoneBook(10);
int choice;
char name[MAX_NAME_LENGTH], phone[MAX_PHONE_LENGTH];
do {
printf("Phone Book Application\n");
printf("1. Add contact\n");
printf("2. Delete contact\n");
printf("3. Search contact\n");
printf("4. Sort phone book\n");
printf("5. Print phone book\n");
printf("0. Exit\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice)
{
case 1:
printf("Enter name: ");
scanf("%s", name);
printf("Enter phone number: ");
scanf("%s", phone);
addContact(phoneBook, name, phone);
break;
case 2:
printf("Enter name to delete: ");
scanf("%s", name);
deleteContact(phoneBook, name);
break;
case 3:
printf("Enter name to search: ");
scanf("%s", name);
searchContact(phoneBook, name);
break;
case 4:
sortPhoneBook(phoneBook);
printf("Phone book sorted successfully.\n");
break;
case 5:
printPhoneBook(phoneBook);
break;
case 0:
break;
default:
printf("Invalid choice. Please try again.\n");
break;
}
printf("\n");
} while (choice != 0);
destroyPhoneBook(phoneBook);
return 0;
Contact newContact;
strcpy(newContact.name, name);
strcpy(newContact.phone, phone);
phoneBook->contacts[phoneBook->size] = newContact;
phoneBook->size++;
phoneBook->size--;
printf("Contact deleted successfully.\n");
break;
}
}
if (!found) {
printf("Contact not found.\n");
}
}
if (!found) {
printf("Contact not found.\n");
}
}
printf("Phone Book:\n");
for (int i = 0; i < phoneBook->size; i++) {
printf("Name: %s, Phone: %s\n", phoneBook->contacts[i].name,
phoneBook->contacts[i].phone);
}
}
Performance Evaluation
Simulation Environment:
Results and Discussions:
a) Data Storage:
The system utilizes file handling techniques to store phone records persistently. It creates a file
(e.g., "phones.dat") to store the data in a structured format. Each phone record is stored as a
separate entry in the file, making it easy to retrieve and manipulate the data.
b) User Interface:
The system employs a command-line interface to interact with the users. It presents interface,
where users can select specific options by entering corresponding numbers. The system validates
user inputs and guides users through the available operations using descriptive messages.
c) Implementation Challenges:
During the development of the Phone Management System, a few challenges were encountered,
including:
Input Validation: Ensuring the validation and handling of user inputs to prevent errors or
unexpected behavior.
Data Integrity: Implementing mechanisms to maintain data integrity and consistency during
operations like adding, updating, and deleting records.
Error Handling: Incorporating robust error handling techniques to gracefully handle exceptions and
provide meaningful error messages to the users.
Performance Optimization: Optimizing the system's performance to handle a large number of
phone records efficiently
Analysis and Outcome:
Conclusion
Introduction:
The phone book management system is a practical application that can be used in
various domains, such as personal contact management, business directories, and
organizational phone directories. It offers a convenient way to store and retrieve
contact information, making it easier to manage and access essential contacts.
Practical Implications:
Personal Contact Management: Individuals can use this system to maintain their
personal contacts, including friends, family members, colleagues, and other
important contacts. They can add, delete, and search for contacts based on their
names or phone numbers.
Business Directories: Companies and organizations can utilize this system to create
and manage their internal phone directories. It enables employees to quickly find
and contact colleagues or departments within the organization.
The implemented phone book management system provides a solid foundation, but
there are several areas where future work can expand and enhance its capabilities:
4. "C Programming Absolute Beginner's Guide" by Greg Perry and Dean Miller.