KL UNIVERSITY
FRESHMAN ENGINEERING DEPARTMENT
                A Project Based Lab Report On
            MINI-TELEPHONE DIRECTORY
                     SUBMITTED BY:
            2400030408       GANUGULA VISHNU
            2400030568       NIPPULETI SIVA NAGA RAJU
            2400030935       PEPETI HEMNANTH KUMAR
            2400031059       SURAPUREDDY SAI CHARAN
          UNDER THE ESTEEMED GUIDANCE OF
             Mr. BELLAM SURENDRA BABU
                      Assistant Professor
                     KL UNIVERSITY
                Green fields, Vaddeswaram – 522 502
                        Guntur Dt., AP, India.
1|Page
      DEPARTMENT OF BASIC ENGINEERING SCIENCES
                               CERTIFICATE
              This is to certify that the project based laboratory report entitled
 “Mini - Telephone Directory” submitted by Ganugula Vishnu, NIPPULETI SIVA
 NAGA RAJU, PEPETI HEMNANTH KUMAR, SURAPUREDDY SAI CHARAN bearing
 Regd. No. 2400030408, 2400030568, 2400030935, 2400031059 to the
 Department of Basic Engineering Sciences, KL University in partial
 fulfillment of the requirements for the completion of a project in
 “Computational Thinking for Object Oriented Design
 - 22SC1203” course in I B Tech II Semester, is a bonafide record of the work
 carried out by him/her under my supervision during the academic year 2020-21.
 PROJECT SUPERVISOR                                 HEAD OF THE DEPARTMENT
 Mr. R. Krupadanam                                  Dr. D. Haritha
2|Page
                          ACKNOWLEDGEMENTS
         It is great pleasure for me to express my gratitude to our honorable President
 Sri. Koneru Satyanarayana, for giving the opportunity and platform with facilities in
 accomplishing the project-based laboratory report.
         I express the sincere gratitude to our director Dr. A Jagadeesh for his
 administration towards our academic growth.
         I express sincere gratitude to our Coordinator Dr. V. Krishna Reddy and
 HOD- BES Dr. D. Haritha for her leadership and constant motivation provided in
 successful completion of our academic semester. I record it as my privilege to deeply
 thank for providing us the efficient faculty and facilities to make our ideas into reality.
         I express my sincere thanks to our project supervisor <name> for his/her novel
 association of ideas, encouragement, appreciation, and intellectual zeal which
 motivated us to venture this project successfully.
         Finally, it is pleased to acknowledge the indebtedness to all those who devoted
 themselves directly or indirectly to make this project report success.
                                                                Project Associates…..
                                        2400030408         GANUGULA VISHNU
                                        2400030568         NIPPULETI SIVA NAGA RAJU
                                        2400030935         PEPETI HEMNANTH KUMAR
                                        2400031059         SURAPUREDDY SAI CHARAN
3|Page
                            ABSTRACT
 A Mini-Telephone Directory is a compact, organized listing of contact
 information, commonly including names, phone numbers, and other essential
 details like email addresses, physical addresses, relationships, and additional
 notes. It serves as a quick and efficient tool for managing contact details within
 small groups, communities, or organizations. This directory is often used for
 personal, business, or administrative purposes where access to vital contact
 information is necessary.
 In its simplest form, the Mini-Telephone Directory can be created as a physical
 list, a digital document (such as a spreadsheet), or an advanced database system.
 Each contact entry typically includes the name of the individual or business,
 their phone number(s), and optional fields such as email addresses, addresses,
 relationships, and specific notes about the contact. The directory can be
 organized alphabetically or according to specific categories depending on the
 use case.
 The digital version of the directory offers advantages such as easy updates,
 searchability, and the ability to store vast amounts of data. It can be
 implemented using various technologies, from basic spreadsheets to custom
 software applications built with programming languages like Python,
 JavaScript, or database systems like SQL.
 A well-maintained Mini-Telephone Directory improves accessibility, facilitates
 communication, and can be a valuable resource for quickly retrieving contact
 information for a wide variety of personal and professional purposes.
4|Page
                               INDEX
         S.NO                    TITLE        PAGE NO
          1     Introduction                    <6>
          2     Aim of the Project              <7>
         2.1    Advantages & Disadvantages      <8-9>
         2.2    Future Implementation           <10>
         2.3    Software & Hardware Details     <11>
          3     Algorithm                       <12>
          4     Flowchart                       <13>
          5     Implementation                 <14-21>
          6     Outputs/ScreenShots             <22>
          7     Conclusion                      <23>
5|Page
                           INTRODUCTION
 In today’s fast-paced world, managing and organizing contact information
 efficiently has become increasingly important. A Mini-Telephone Directory is
 a compact solution that allows individuals, businesses, or organizations to
 maintain a quick reference of essential contact details in a structured and easy-
 to-use format. Whether for personal use, small businesses, or community
 organizations, such directories provide a convenient means of storing critical
 information like phone numbers, addresses, emails, and more.
 At its core, a Mini-Telephone Directory serves the purpose of streamlining
 communication by ensuring that all relevant contact data is readily accessible.
 This directory is typically much smaller in scale compared to larger, more
 comprehensive phone books or contact databases, focusing on a specific set of
 individuals or entities. It may include basic fields such as name, phone number,
 email address, physical address, relationship, and additional notes.
 Mini-Telephone Directories can be created and maintained in various formats-
 physical, digital, or online. In a physical format, they may be printed out on
 paper and stored in a binder or notebook. Digital formats, such as spreadsheets
 or contact management software, offer more flexibility by allowing for easy
 updates, searching, and organization. On a larger scale, some may use database
 systems to store and manage thousands of contacts, providing advanced features
 like automatic sorting, searching, and even integration with other systems like
 customer relationship management (CRM) tools.
 This directory is particularly useful in small communities, local businesses, or
 as a personal tool for anyone who wants to keep track of essential contacts
 without the complexity of larger systems. It enables users to quickly find and
 communicate with the people or organizations they need to reach, making it an
 indispensable tool in everyday life.
6|Page
                            AIM OF THE PROJECT
 AIM:
 The aim of a Mini-Telephone Directory is to offer a simple and efficient
 solution for organizing and managing contact information in a compact format.
 It ensures that essential details such as phone numbers, email addresses, and
 physical addresses are easily accessible, facilitating quick communication. The
 directory aims to be flexible, allowing users to create and maintain their contact
 lists in physical, digital, or online formats. By streamlining contact
 management, it simplifies communication for individuals, small businesses, and
 communities. The ultimate goal is to provide an organized tool that enhances
 connectivity while minimizing complexity.
7|Page
                   Advantages: Mini-Telephone Directory
   1. Ease of Access: A Mini-Telephone Directory allows quick access to
      essential contact information, reducing the time spent searching for
      phone numbers or addresses.
   2. Organization: It helps in organizing contacts in a systematic way, making
      it easier to update and maintain information.
   3. Compactness: Unlike large databases or phone books, a Mini-Telephone
      Directory is small and focused, making it ideal for personal use or small-
      scale environments.
   4. Flexibility: It can be created in various formats—physical, digital, or
      online—allowing users to choose the method that best fits their
      needs.
   5. Improved Communication: By centralizing contact details in one place,
      it facilitates better communication, whether for personal, business, or
      community purposes.
   6. Portability: A digital or physical directory is easy to carry and can be
      accessed on-the-go, ensuring contacts are always available when
      needed.
   7. Customization: It can be customized to suit the user’s needs, such
      as adding additional fields for notes, relationships, or preferred
      contact times.
8|Page
         Disadvantages: Mini-Telephone Directory
   1. Limited Coverage: It only contains contact information for a small,
      specific group, making it less comprehensive than larger directories.
   2. Outdated Information: Printed versions may quickly become
      outdated if not regularly updated, leading to incorrect details.
   3. Privacy Concerns: Personal information may be exposed if the
      directory is misplaced or accessed by unauthorized people.
   4. Manual Searching: Printed directories lack search features,
      requiring users to manually browse through the list.
   5. Risk of Damage or Loss: Physical copies can be easily lost or
      damaged, resulting in the loss of valuable contact information.
   6. Environmental Impact: Printed directories contribute to paper waste
      and resource consumption.
   7. Limited Customization: Printed versions are not easily
      customizable to meet specific user needs or preferences.
   8. No Real-Time Updates: Unlike digital versions, printed directories
      cannot be updated immediately, making them less flexible.
9|Page
Future implementations: mini telephone directory
    1. Integration with Cloud Services: Allow users to sync their directory with
       cloud storage for easy access and backup across multiple devices.
    2. Voice Recognition: Implement voice commands to search, add, or delete
       contacts, making it more user-friendly.
    3. AI-Powered Suggestions: Use AI to suggest frequently contacted numbers
       or categorize contacts based on user behavior.
    4. Enhanced Security: Add features like biometric authentication (fingerprint
       or facial recognition) to protect sensitive contact information.
    5. Multimedia Integration: Enable users to attach photos, notes, or even short
       audio clips to each contact for a richer experience.
    6. Cross-Platform Compatibility: Develop apps for various platforms
       (Windows, Android, iOS) to ensure seamless usage.
    7. Smart Search: Introduce advanced search options, such as searching by
       partial names, locations, or tags.
    8. Emergency Features: Include a one-tap emergency contact feature for
       quick access during critical situations.
    9. Localization: Support multiple languages and regional formats to cater to a
       diverse user base.
    10.Integration with Social Media: Link contacts with their social media
       profiles for real-time updates and communication.
10 | P a g e
                       SYSTEM REQUIREMENTS
          SOFTWARE REQUIREMENTS:
           The major software requirements of the project are as
           follows: Language : C Language
           Operating system : Windows
           Tools               : Dev-C++
          HARDWARE REQUIREMENTS:
           The hardware requirements that map towards the software are as follows:
               RAM           : 8 GB.
               Processor     : Intel i5 or higher.
11 | P a g e
               Flowchart
12 | P a g e
                           ALGORITHM
  STEP-1:Start
  STEP-2:Initialize Define constants for max contacts, name length, and phone
  number length .Create a Contact structure to hold name and phone number.
  STEP-3:Open file directory.dat to load contacts.Read the number of contacts and
  their details from the file and Close the file.
  STEP-4:Display menu with options: Add, Search, Display, Delete, Save,
  Exit. STEP-5:Read user input for choice and execute corresponding function.
  STEP-6:Check if the directory is full.Prompt user for name and phone number,
  then store the contact.
  STEP-7:Prompt user for a name to search,Loop through contacts, print matching
  results.
  STEP-8:Print all contacts if directory is not empty.
  STEP-9:Show all contacts and prompt user for an index.Remove selected contact
  and shift others.
  STEP-10Save Contacts,Write current contacts to directory.dat
  file. STEP-11: Exit Program,Exit the loop and terminate the
  program.
13 | P a g e
                          IMPLEMENTATION
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #define MAX_CONTACTS 100
  #define NAME_LENGTH 50
  #define PHONE_LENGTH 15
  typedef struct {
     char name[NAME_LENGTH];
     char phoneNumber[PHONE_LENGTH];
  } Contact;
  Contact directory[MAX_CONTACTS];
  int contactCount = 0;
  void addContact();
  void searchContact();
  void displayAllContacts();
  void deleteContact();
14 | P a g e
  void saveToFile();
  void loadFromFile();
  void displayMenu();
 int main()
     { int
     choice;
     loadFromFile();
  do {
         displayMenu();
         printf("Enter your choice: ");
         scanf("%d", &choice);
         while(getchar() != '\n');
         switch(choice) {
               case 1:
                 addContact();
                 break;
               case 2:
                 searchContact();
                 break;
               case 3:
                 displayAllContacts();
                 break;
15 | P a g e
               case 4:
                 deleteContact();
                 break;
               case 5:
                 saveToFile();
                 printf("Contacts saved to file.\n");
                 break;
               case 6:
                 printf("Exiting program. Goodbye!\n");
                 break;
               default:
                 printf("Invalid choice. Please try again.\n");
         printf("\n");
      } while(choice != 6);
      return 0;
  void displayMenu() {
        printf("\n===== MINI TELEPHONE DIRECTORY =====\n");
        printf("1. Add Contact\n");
        printf("2. Search Contact\n");
        printf("3. Display All Contacts\n");
        printf("4. Delete Contact\n");
16 | P a g e
          printf("5. Save Contacts to File\n");
          printf("6. Exit\n");
  void addContact() {
  if(contactCount >= MAX_CONTACTS) {
          printf("Directory is full. Cannot add more contacts.\n");
          return;
      Contact newContact;
      printf("Enter name: ");
      scanf("%49s", newContact.name);
      printf("Enter phone number: ");
      scanf("%14s", newContact.phoneNumber);
      directory[contactCount++] = newContact;
      printf("Contact added successfully!\n");
  void searchContact() {
      char searchName[NAME_LENGTH];
      int found = 0, i;
17 | P a g e
     printf("Enter name to search: ");
     scanf("%49s", searchName);
     printf("\nSearch Results:\n");
     printf(“____________\n");
for(i = 0; i < contactCount; i++)
         if(strstr(directory[i].name, searchName) != NULL) {
               printf("Name: %s\n", directory[i].name);
               printf("Phone: %s\n",
               directory[i].phoneNumber); printf("\n");
               found = 1;
     if(!found) {
         printf("No matching contacts found.\n");
 }
 void displayAllContacts()
     { int i;
     if(contactCount == 0) {
         printf("The directory is empty.\n");
18 | P a g e
          return;
printf("\nAll Contacts:\n");
printf(“___________\n”);
for(i = 0; i < contactCount; i++)
          printf("%d. Name: %s\n", i+1, directory[i].name);
          printf(" Phone: %s\n", directory[i].phoneNumber);
          printf("               \n");
    }
    void deleteContact()
      { int index, i;
      if(contactCount == 0) {
          printf("The directory is empty.\n");
          return;
      displayAllContacts();
      printf("Enter the number of the contact to delete:
      "); scanf("%d", &index);
      if(index < 1 || index > contactCount)
19 | P a g e
          { printf("Invalid contact number.\
          n"); return;
      index--;
      for(i = index; i < contactCount - 1; i++) {
         directory[i] = directory[i + 1];
         }
      contactCount--;
      printf("Contact deleted successfully!\n");
  void saveToFile() {
      FILE *file = fopen("directory.dat", "wb");
      if(file == NULL) {
          printf("Error opening file for writing.\n");
          return;
      fwrite(&contactCount, sizeof(int), 1, file);
      fwrite(directory, sizeof(Contact), contactCount, file);
      fclose(file);
  void loadFromFile() {
      FILE *file = fopen("directory.dat", "rb");
20 | P a g e
      if(file == NULL) {
          return;
      fread(&contactCount, sizeof(int), 1, file);
         fread(directory, sizeof(Contact), contactCount,files);
      fclose(file);
      printf("Loaded %d contacts from file.\n", contactCount);
21 | P a g e
INTEGRATED AND SYSTEM TESTING OUTPUTS
22 | P a g e
                            CONCLUSION
  The Mini Telephone Directory program offers a simple yet effective solution for
  managing personal contact information, allowing users to easily store, search,
  display, and delete contacts. With its core features, such as adding contacts with
  names and phone numbers, searching for contacts based on name, and
  displaying the entire list of contacts, the program provides a user-friendly
  interface for managing a small contact database. Additionally, the option to
  delete contacts and save the directory to a file ensures that users can maintain
  and update their contact list efficiently.
  Overall, this program serves as an excellent starting point for anyone looking to
  build a telephone directory application. It demonstrates how to handle
  fundamental operations like adding, searching, deleting, and saving data, all of
  which are core aspects of any contact management system. With potential for
  expansion, the Mini Telephone Directory provides a solid base for future
  development, offering a practical and efficient way to manage contact
  information.
23 | P a g e