Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

A

Micro-Project Report
On

“Phone Directory System Project In C++”

Submitted By
Dhananjay Ramse (64)
Siddhesh Ranaware (65)
Shriniti Nikat (74)

Under Guidance Of
Mr. Balaji Dande Sir

Diploma Course in Computer Technology (As


per directives of I Scheme, MSBTE)

Sinhgad Technical Education Society’s


SOU. VENUTAI CHAVAN POLYTECHNIC, PUNE – 411046 The
Academic Year 2021 – 2022
MAHARASHTRA STATE BOARD OF

TECHNICAL EDUCATION

Certificate
This is to certify that Mr. Dhananjay Ramse “Roll No. 64” of Semester III of Diploma in

Computer Technology of Institute STES’s Sou. Venutai Chavan Polytechnic (Code: 0040)

has completed the Micro Project satisfactorily in Subject Object-Oriented Programming

using ‘C++’ (22316) for the academic year 2021 – 2022 as prescribed in the curriculum.

Program Code: CM

Course Code: CM/3/I

Place: Pune Enrollment No: 2100400309


1900400169

Date: _________________ Exam. Seat No: __________

Subject Teacher HOD stamp/signature Institute stamp


MAHARASHTRA STATE BOARD OF

TECHNICAL EDUCATION

Certificate
This is to certify that Mr. Siddhesh Ranaware Roll No. 65 of Semester III of Diploma in
Computer

Technology of Institute STES’s Sou. Venutai Chavan Polytechnic (Code: 0040) has
completed the Micro Project satisfactorily in Subject Object-Oriented Programming
using ‘C++’ (22316) for the academic year 2021 – 2022 as prescribed in the curriculum.

Program Code: CM

Course Code: CM/3/I

Place: Pune Enrollment No:2000100401


1900400219

Date: _________________ Exam. Seat No: __________

Subject Teacher HOD stamp/signature Institute stamp


MAHARASHTRA STATE BOARD OF

TECHNICAL EDUCATION

Certificate
This is to certify that Mr. Shriniti Nikat Roll No. 74 of Semester III of Diploma in

Computer Technology of Institute STES’s Sou. Venutai Chavan Polytechnic (Code: 0040)

has completed the Micro Project satisfactorily in Subject Object-Oriented Programming

using ‘C++’ (22316) for the academic year 2021 – 2022 as prescribed in the curriculum.

Program Code: CM

Course Code: CM/3/I

Place: Pune Enrollment No:2100400330


1900400203

Date: _________________ Exam. Seat No: __________


Subject Teacher HOD stamp/signature Institute stamp
Data Structures using ‘C’-22317 Binary Search Tree

Annexure – I

Micro-Project Proposal

Phone Directory System project in C++

1.0 Aim of the Micro – Project:


This Micro-Project aims at developing a ‘C++’ program for Phone Directory System
using Object Oriented Programming In C++.

2.0 Intended Course Outcomes:


a. Develop a ‘C++’ program to solve problems using Object Oriented Approach.

b. Develop a ‘C++’ program using Classes and Objects.

c. Implement inheritance in ‘C++’ program.

d. Use polymorphism in ‘C++’ program.

3.0 Proposed Methodology:


This Micro-Project aims at developing a ‘C++’ program for Phone Directory
System.
I. Study all the concepts of ‘C++’ programming
II. Identify the requirements of projects
III. Design the structure of project
IV. Debug code and eliminate errors occurred during compilation and execution
V. Test the working of project
VI. Prepare the final project

4.0 Action Plan:


Sr. Details of Activity Planned Planned Name of
No Start Date Finish Date Responsible Team
Member
01 Identify the requirements of the 17/11/2021 18/11/2021 Dhananjay Ramse
project
02 Design the structure of the 19/11/2021 21/11/2021 Siddhesh Ranaware
project
03 Develop a program using 22/11/2021 24/11/2021 Shriniti Nikat
Object Oriented Programming
in ‘C++’

Department of Computer Technology Academic Year 2020-2021 1


Data Structures using ‘C’-22317 Binary Search Tree

04 Debug code and eliminate 25/11/2021 30/11/2021 Dhananjay Ramse


errors occurred during
compilation and execution
05 Test the project 06/12/2021 08/12/2021 Siddhesh Ranaware
06 Prepare the final report 13/12/2021 15/12/2021 Shriniti Nikat

5.0 Resources Required:


Sr. No Resources Required Specifications
01 Computer System Pentium Intel CORE i5
02 Operating System Windows 10, 32 Bit Operating System
03 ‘C++’ Compiler C-Free 5

6.0 Team Members:


Sr. No Roll. No Name of Student
01 64 Dhananjay Ramse
02 65 Siddhesh Ranaware
03 74 Sriniti Nikat

Department of Computer Technology Academic Year 2020-2021 2


Data Structures using ‘C’-22317 Binary Search Tree

Annexure – II
Micro-Project Report
Phone Directory System Project In C++

1.0 Rationale:
This system is developed using the general need required by the user while using
the phone directory book. In order to keep updated the phone book directory, the
admin will have the authority to add and delete as well as modify the existing
records within the phone book directory. The users of the directory will only have
the authority to search any particular record and listing details of all available
records. Admin will have the authority to perform various operations such as add
customer records, search any particular record, delete record, modify existing
record etc. To provide the search result within short interval of time optimized
search algorithm code has been used which will able to provide the results within
seconds. To make all operations as easier as possible, user friendly approach has
been taken into account by which users have to only give their answer during final
confirmation to make their operations successful. The background processing
system will take care of all processing task and maintain data integrity in order to
reduce the redundancy of data. For searching operation, users will able to get any
particular record using their contact or phone number but the only condition is
that, customers record must be available within the file system. If no such record
will be available, proper error message will be displayed as per user input provided
to the system.

2.0 Aim of the Micro – Project:


This Micro-Project aims at developing a ‘C++’ program for Phone Directory System
using Object Oriented Programming.

3.0 Course Outcomes Addressed:


a. Develop a ‘C++’ program to solve problems using Object Oriented Approach
b. Develop a ‘C++’ program using Classes and Objects
c. Implement inheritance in ‘C++’ program
d. Use polymorphism in ‘C++’ program

4.0 Literature Review:

Department of Computer Technology Academic Year 2020-2021 3


Data Structures using ‘C’-22317 Binary Search Tree

Customer need more convenient way to get their required results in proper time.
In today’s era where technology plays a vital role in each person life, they are bound
to use the old fashioned manual book to search any particular record. Even the
publishers have to print the new records in their new volume and published each
year. Customers always gets irritated to pay amount for new volume in each year.
Even searching process of particular record is also one big problem for the
customers, they have to first go through the index page to details on alphabetical
letter and after that they have to go through the various pages using page number
to get their desired results which also a time consuming process.

5.0 Actual Methodology Followed:


The project aims at developing a Phone Directory System
I. Study all the concepts of Data Structures
II. Identify the requirements of project
III. Design the structure of project
IV. Debug code and eliminate errors occurred during compilation and execution V.
Test the working of project.
VI. Prepare the final project

6.0 Resources Required:


Sr. No Resources Required Specifications
01 Computer System Pentium Intel CORE i5
02 Operating System Windows 10, 64 Bit Operating System
03 ‘C++’ Compiler C-Free 5

7.0 Outputs of Micro – Project:

7.1 Source Code: }

}
// TELEPHONE DIRECTORY SYSTEM

#include<iostream.h>
#include<fstream.h>
#include<iomanip.h>
#include<string.h>
#include<stdlib.h>
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
#include<graphics.h>

Department of Computer Technology Academic Year 2020-2021 4


Data Structures using ‘C’-22317 Binary Search Tree

#include<dos.h>

class stud
{
public:

char name[20];

char address[20];

unsigned int ph_no;

void get(void);

void show(void);

void modify(void);
};

void stud::get(void)

int i=0;

cout<<"\n Enter name -> ";

cin.get(name[i]);

while(name[i]!='\n')
{
i=i+1;

cin.get(name[i]);

}
cin.getline(name,20,'\n');

cout<<" Enter address -> ";

Department of Computer Technology Academic Year 2020-2021 5


Data Structures using ‘C’-22317 Binary Search Tree

cin.getline(address,20,'\n');

fflush(stdin);

cout<<" Enter ph_no\t-> \t";

cin>>ph_no;

fflush(stdin);

void stud::show(void)

cout<<"\n";

cout<<" NAME :"<<"\t"<<name<<"\n";

cout<<" ADDRESS :"<<"\t"<<address<<"\n";

cout<<" Ph_No :"<<"\t"<<ph_no<<"\n";


}

void main()

int gdriver = DETECT, gmode, errorcode;

int x,y;

int midx,midy;

/* initialize graphics and local variables */

initgraph(&gdriver, &gmode, "c:\\turboc3\\bgi");

/* read result of initialization */

Department of Computer Technology Academic Year 2020-2021 6


Data Structures using ‘C’-22317 Binary Search Tree

errorcode = graphresult();

if (errorcode != grOk) /* an error occurred */


{
printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1); /* terminate with an error code */

closegraph();
}

y:

char*pass="RPV";

char*ppass;

gotoxy(25,8);

int size=7;

settextstyle(7,0,size);

setbkcolor(BLUE);

setcolor(WHITE);

outtextxy(180,50,"WELCOME" );

setcolor(WHITE);

outtextxy(250,200,"TO");

settextstyle(8,0,5);

Department of Computer Technology Academic Year 2020-2021 7


Data Structures using ‘C’-22317 Binary Search Tree

setfillstyle(1,DARKGRAY);

setcolor(WHITE);

outtextxy(60,350,"\n\nTELEPHONE DIRECTORY");

getch();

clearviewport();

settextstyle(3,0,4);

settextstyle(7,0,4);

getch();

clearviewport();

g:

ppass=getpass("ENTER THE PASSWORD::");

if(strcmpi(pass,ppass)!=0)
{
cout<<"\n\t\t\tIncorrect password";

cout<<"\n\t\t\tTry again";

getchar();

goto g;

}
else
{

stud s;

char name[20];

Department of Computer Technology Academic Year 2020-2021 8


Data Structures using ‘C’-22317 Binary Search Tree

char name1[20];

int ch;

clrscr();

setbkcolor(BLUE);

setcolor(YELLOW);

closegraph();

z:

cout<<"\n\n\n\n\n\n\n\n\n";

initgraph(&gdriver, &gmode,"c:\\turboc3\\bgi");

setcolor(BLUE);

rectangle(60,10,600,400);

setfillstyle(1,YELLOW);

bar(61,11,599,399);

outtextxy(200,30," HELP -> PRESS ANY KEY 1 TO 6 " );

settextstyle(TRIPLEX_FONT ,HORIZ_DIR,4);

outtextxy(220,50,"\n\n1. TO ADD " );

setcolor(BLUE);

settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

outtextxy(220,100,"\n\n2. TO SHOW " );

setcolor(BLUE);

Department of Computer Technology Academic Year 2020-2021 9


Data Structures using ‘C’-22317 Binary Search Tree

settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

outtextxy(220,150,"\n\n3. TO SEARCH " );

setcolor(BLUE);

settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);

outtextxy(220,200,"4.\n\n TO MODIFY " );


setcolor(BLUE);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(220,250,"\n\n\n5. TO DELETE " );
setcolor(BLUE);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(220,300,"\n\n\n6. TO EXIT " );

settextstyle(TRIPLEX_FONT,HORIZ_DIR,3);

outtextxy(220,350," Enter the choice ->");

gotoxy(62,23);

cin>>ch;

switch(ch)
{
case 1: //responsible for addition of record
{
clrscr();

fstream f;

f.open("rec",ios::in|ios::out|ios::ate|ios::app|ios::binary);
char ans;

s.get();
f.write((char *)&s,sizeof(s));
clrscr();
outtextxy(250,360, " Do you want to continue:- ");
ans=getche();

Department of Computer Technology Academic Year 2020-2021 10


Data Structures using ‘C’-22317 Binary Search Tree

if(ans=='Y' || ans=='y'){goto z;}


f.close();

break;
}
case 2: // will show all the contents of the file
{
clrscr();
cout<<"\n\n";
fstream f;
f.open("rec",ios::in|ios::out|ios::ate|ios::app|ios::binary);

f.seekg(0);
int ctr=0;

while(f.read((char *)&s,sizeof(s)) )
{
ctr=ctr+1;

if(ctr==8) {getchar(); clrscr();ctr=0;}


s.show();

if(f.eof()==1)
{break;}
}
f.close();
outtextxy(240,350, " Do you want to continue :-");

char ans;
ans=getche();
if(ans=='y'|| ans=='Y'){
closegraph();
goto z;}else{exit(1);}

case 3: // search
{

Department of Computer Technology Academic Year 2020-2021 11


Data Structures using ‘C’-22317 Binary Search Tree

gotoxy(60,25);
clearviewport();
rectangle(10,10,630,470);
setbkcolor(DARKGRAY);
textbackground(3);
textcolor(5);
clrscr();
char ans;
ifstream f;
stud s;
char name[20];
char address[20];
unsigned int ph_no;
f.open("rec",ios::in|ios::binary);
cout<<"\n\n\n Enter name whose record to be search :";
cin>>name;
do
{
f.read((char *)&s,sizeof(s));
if(f.eof()==1) {break;}
if(strcmpi(s.name,name)==0)
{
cout<<"\n Name :"<<s.name;
cout<<"\n address :"<<s.address;
cout<<"\n phone_no :"<<s.ph_no;
getchar();
}
}while(f);
f.close();
settextstyle(7,0,1);
outtextxy(250,410,"Do You Want To Continue:");
ans=getchar();
if(ans=='Y'||ans=='y')
goto z;
else
{
closegraph();
break;
}

Department of Computer Technology Academic Year 2020-2021 12


Data Structures using ‘C’-22317 Binary Search Tree

case 4: //for the modification


{
clrscr();
char ans;
fstream f; stud s;
char name[20]; char address[20]; unsigned int ph_no;
f.open("rec",ios::in|ios::binary);
cout<<"\n\n\n Enter person ph_no whose record to be changed :";
cin>>ph_no;
do
{
f.read((char *)&s,sizeof(s));
if(f.eof()==1) {break;}

if(s.ph_no==ph_no)
{
cout<<"\n Current Name :"<<s.name;
cout<<"\n Current Address :"<<s.address;
cout<<"\n Current Phone No :"<<s.ph_no;
getchar();
cout<<"\n Enter the new name :";
cin>>name;
cout<<"\n Enter the city :";
cin>>address;
cout<<"\n Enter new ph_no :";
cin>>ph_no;
strcpy(s.name,name);
strcpy(s.address,address);
s.ph_no=ph_no;
int l=f.tellg();
f.close();
f.open("rec",ios::out|ios::binary|ios::ate);
f.seekg(l-sizeof(s));
f.write((char *)&s,sizeof(s));
}
}while(f);
f.close();
outtextxy(290,360, " Do you want to continue :-");
ans=getche();
if(ans=='Y'||ans=='y')

Department of Computer Technology Academic Year 2020-2021 13


Data Structures using ‘C’-22317 Binary Search Tree

{goto z;}
break;
}

case 5: //responsible for the deletion of the record


{
clrscr();
char name[20];
stud s;
ifstream fin;
fstream fout;
fin.open("rec",ios::in|ios::binary);
fout.open("va",ios::app|ios::binary);
cout<<"\n \t\t\t DELETING :-";
int i;
fflush(stdin);
cout<<"\n\n Enter the name :- ";
cin.get(name[i]);
while(name[i]!='\n')
{
i=i+1;
cin.get(name[i]);

fflush(stdin);
fflush(stdout);
cin.getline(name,20,'\n');
while(fin)
{
fin.read((char *)&s,sizeof (s));
if(strcmp(s.name,name)==0)
{fout.read((char *)&s,sizeof(s));
}
else
{
if(fin.eof()==1) {break;}
fout.write((char *)&s,sizeof(s));
}

Department of Computer Technology Academic Year 2020-2021 14


Data Structures using ‘C’-22317 Binary Search Tree

}
fin.close();
fout.close();
system("del rec");
system("ren va rec");
cout<<"\n Enter is get Deleted:-";
getchar();

char ans;
outtextxy(240,340, " Do you want to continue:- ");
ans=getche();
if (ans=='y' || ans=='Y')
{goto z;}
else
if (ans=='n' || ans=='N')
{getchar();
exit(1);
}
}
case 6:
{
clearviewport();
outtextxy(250,360,"THE END OF THE PROJECT:-");
outtextxy(260,390,"\n \n\n\n\n PLEASE PRESS ENTER");
getchar();
closegraph();
exit(1);

}
default:
goto z;
}
}
}
}

Department of Computer Technology Academic Year 2020-2021 15


Data Structures using ‘C’-22317 Binary Search Tree

7.2 Output:

Department of Computer Technology Academic Year 2020-2021 16


Data Structures using ‘C’-22317 Binary Search Tree

Department of Computer Technology Academic Year 2020-2021 17


Data Structures using ‘C’-22317 Binary Search Tree

8.0 Skills Developed:


1 During developing the Micro-Project, we learnt many practically applied
concepts of ‘C++’ and theory as well.
2 We learned to develop a ‘C++’ program using classes and objects.
3 We also learned to develop, compile and execute a ‘C++’ program.
4 We also learned to design an prepare a report on the project.

Department of Computer Technology Academic Year 2020-2021 18


Data Structures using ‘C’-22317 Binary Search Tree

9.0 Applications of this Project:


1. The ‘Phone Directory System Project’ contains a set of basic functions for adding,
searching, updating, and deleting new contacts.
2. It uses functions, file management etc.
3. This project provides information on adding, viewing, modifying, receiving, and
deleting data from file.

10.0 Conclusion:
Thus, we developed a ‘Phone Directory System Project In C++’ using ‘C++’ concepts.

Thanks!

Department of Computer Technology Academic Year 2020-2021 19

You might also like