Mini Project Report
Mini Project Report
Reviewed by
Ms. Heyashanthini
(DESIGNATION, DEPT. OF CSE
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Certificate
This is to certify that the mini project work titled
YELLOW PAGE
Submitted in partial fulfillment of the degree of Bachelor of
Engineering
PAPPU SAH SUDI
1NH18CS137
DURING
ODD SEMESTER 2019-2020
For
19CSE39
1._______________________ ______________________
2._______________________ ______________________
CONTENTS
ABSTRACT I
ACKNOWLEDGEMENT II
LIST OF FIGURES V
LIST OF TABLES VI
1. INTRODUCTION
1.1. PROBLEM DEFINITION 1
1.2. OBJECTIVES 1
1.3. METHODOLOGY TO BE FOLLOWED 2
1.4. EXPECTED OUTCOMES 2
1.5. HARDWARE AND SOFTWARE REQUIREMENTS
2. DATASTRUCTURES
2.1. STACK 5
2.2. QUEUES 6
2.3. LINKED LIST 7
2.4. TREES
2.5. GRAPHS
3. DESIGN
3.1. DESIGN GOALS 17
3.2. ALGORITHM/ PSEUDOCODE
4. IMPLEMENATION 20
4.1. MODULE1 FUNCTIONALITY
4.2. MODULE2 FUNCTIONALITY
4.3. MODULE3 FUNCTIONALITY
4.4. MODULE4 FUNCTIONALITY
5. RESULTS 23
6. CONCLUSION
REFERENCES 25
LIST OF FIGURES
1.1 STACK 1
1.2 QUEUES 2
1.4 TREES 4
1.5 GRAPHS 5
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task would
be, but impossible without the mention of the people who made it possible, whose constant
guidance and encouragement crowned my efforts with success.
I also record here the constant encouragement and facilities extended to me by Dr.
Manjunatha, Principal, NHCE, Dr. Prashanth.C.S.R, Dean Academics, Dr. B. Rajalakshmi,
Head of the Department of Computer Science and Engineering. I extend my sincere
gratitude to them.
Finally a note of thanks to all the teaching and non-teaching staff of Computer Science and
Engineering Department for their cooperation extended to me and my friends, who helped
me directly or indirectly in the course of the project work.
i
ABSTRACT
This mini project in C “YELLOW PAGES” allows you to perform simple yellow pages
operations like in your mobile. You can add, list, modify, search and delete business related
record. File handling and data structure concepts has been extensively used for almost all
functions in this mini project.
Yellow page is a very simple mini project in C that can help you understand
the basic concepts of functions, file handling and data structure. This
application will teach you how to add, list, modify or edit, search and delete
data to from the file.
Adding new records, listing them, modifying them and updating, search for
contacts saved, and deleting the business records are the basic functions
which make up the main menu of this yellow page application.
This project very much usefull because with the help of this we can get the
information of various of the business organisation in while. As we know
this is the global world, we want get all the facilities by sitting on the bed.
So this will be very usefull because nowadays all are educated and they
need job, for job they need know about the various of the business
organisation and at that time this will be very much usefull for the people.
ii
INTRODUCTION
Yellow page is a very simple mini project in C that can help you understand the basic
concepts of functions, file handling and data structure. This application will teach you how to
add, list, modify or edit, search and delete data to from the file. Adding new records, listing
them, modifying them and updating, search for contacts saved, and deleting the business
records are the basic functions which make up the main menu of this yellow page application.
Business information such as name, address, phone number, email and address are asked while
adding a record into the yellow page. These records can then be modified, listed, searched for
and removed. I have used many functions in this mini project. These functions are easy to
understand as their name only signifies their respective operations.
1. Add business record: This features adds a new business record to the
file. It asks for the phone number and name of the business whose record
is to be created. Upon successful creation of a new business record, the
yellow pages management system program displays the message –
“business details successfully stored.” If the new business record already
exists in the file, it displays the message – “business record already exists!
Try again…”
4. Modify business record: This simple feature allows user to edit the
phone number and business name corresponding to a particular phone
record. Upon successful modification, the program displays the message –
“Record modified successfully”
5. Delete business record: This feature deletes added business record
from the file. The user needs to provide the phone number to be deleted
from yellow pages management system. Upon successful deletion, it
displays the message – “Record deleted!” If the phone number provided is
not found in file, the program displays the message – “Record doesn’t exist!
Try again…”
This project utilizes only 4 header files – conio, stdio, alloc and string. To
make the project simple, graphics has not been used here, but you can add
graphics features to this project to make it a better one.
Analysis:
Objectives of projects:
The goal of this project is:
1. This program is very usefull now-a-days to store complete information of business
organisation.
2. From this we will get know that which program they are going to start and for which their
promotion is going on.
3. We will also know the basic information like phone number, address, their services,
products, etc.
Requirements:
Software requirements:
Hardware Requirements:
- Ram: 1 GB or more.
- Hard disk: 120 GB hard
ALGORITHM:
Coming to the designing part of the project we are using data structures (like double link
list), strings, switch case, loops (like while and for) etc.
STEP 2: Declaration of the functions which we are going to use in the program.
STEP 4: Add the different option of the program in a while loop and inside while loop create
a switch option to call the function we declared.
STEP 5: For functions like add, edit, view and delete keep it in while loop so user can use the
operation repeatedly.
STEP 6: Use file handling concept and correct mode for the file to open in read, write etc.
mode.
STEP 7: Stop.
DATA STRUCTURE
Data structure is way of collecting and organising data in such a way
that we can perform operation on these data in an effective way. Data structures are
structures programmed to store data. So that various operation can be performed on it
easily. It represents the knowledge of data be organised in memory. It should be designed
and implemented in such a way that it reduce the complexity and increases the efficiency.
1.1 STACK
A stack is an abstract data type that serves as a collection of elements, with two
principal operations:
The order in which elements come off a stack gives rise to its alternative name, LIFO
(last in, first out). Additionally, a peek operation may give access to the top without
modifying the stack. The name "stack" for this type of structure comes from the
analogy to a set of physical items stacked on top of each other, which makes it easy
to take an item off the top of the stack, while getting to an item deeper in the stack
may require taking off multiple other items first.
Queue is also an abstract data type or a linear data structure, just like stack data
structure, in which the first element is inserted from one end called the REAR(also
called tail), and the removal of existing element takes place from the other end
called as FRONT(also called head).
This makes queue as FIFO(First in First Out) data structure, which means that
element inserted first will be removed first.
Which is exactly queue system works in real world. If you go to a ticket counter to
buy movie tickets, and are first in the queue, then you will be the first one to get the
tickets. Right? Same is the case with Queue data structure. Data inserted first, will
leave the queue first.
The process to add an element into queue is called Enqueue and the process of
removal of an element from queue is called Dequeue.
Implementation of Queue Data Structure
Queue can be implemented using an Array, Stack or Linked List. The easiest way of
implementing a queue is by using an Array.
Initially the head(FRONT) and the tail(REAR) of the queue points at the first index of
the array (starting the index of array from. As we add elements to the queue, the tail
keeps on moving ahead, always pointing to the position where the next element will
be inserted, while the head remains at the first index.
When we remove an element from Queue, we can follow two possible approaches
(mentioned [A] and [B] in above diagram). In [A] approach, we remove the element
at head position, and then one by one shift all the other elements in forward position.
In approach [B] we remove the element from head position and then move head to
the next position.
In approach [A] there is an overhead of shifting the elements one position
forward every time we remove the first element.
In approach [B] there is no such overhead, but whenever we move head one position
ahead, after removal of first element, the size on Queue is reduced by one space
each time.
Linked List is a linear data structure made up of multiple node elements that are
linked together using pointers. This allows the elements to be stored in different
locations, allowing for a more optimal storage of information. Linked Lists can be
dynamic in size, and have more optimal insertion and deletion than arrays. Each
Link, or Node, has a value it stores, and a link to the next link called next. In addition,
each Linked List has a head and tail property to indicate the beginning and end of the
Linked List.
As was mentioned earlier, a Doubly Linked List is a Linked List that has
capacity to remember its previous node, thereby allowing information to travel from
the head to the tail and vice versa. This is achieved by adding a previous value to
each node that records the previous Node. Since there are more links to consider
when adding and removing Nodes, these operations are potentially not as efficient as
in a regular Linked List.
Doubly Linked List is a variation of Linked list in which navigation is possible in both
ways either forward or backward easily as compared to Single Linked List. Following
are the important terms to understand the concept of doubly linked list.
Link – each link of a linked list can store a data called an element.
Next – each link of a linked list contains a link to the next link called next
Prev−each link of a linked list contains a link to the previous link called Prev.
Linked List − A Linked List contains the connection link to the first link called
First and to the last link called Last.
As per the above illustration, following are the important points to be considered.
Doubly Linked List contains a link element called first and last.
Each link carries a data field(s) and two link fields called next and prev.
Each link is linked with its next link using its next link.
Each link is linked with its previous link using its previous link.
The last link carries a link as null to mark the end of the list.
Basic Operations
1.4 TREE
Tree represents the nodes connected by edges. We will discuss binary tree or binary
search tree specifically.
Binary Tree is a special data structure used for data storage purposes. A binary tree
has a special condition that each node can have a maximum of two children. A binary
tree has the benefits of both an ordered array and a linked list as search is as quick
as in a sorted array and insertion or deletion operation are as fast as in linked list.
Important Terms
Path − Path refers to the sequence of nodes along the edges of a tree.
Root − The node at the top of the tree is called root. There is only one root per
tree and one path from the root node to any node.
Parent − Any node except the root node has one edge upward to a node called
parent.
Child − The node below a given node connected by its edge downward is
called its child node.
Leaf − The node which does not have any child node is called the leaf node.
Visiting − Visiting refers to checking the value of a node when control is on the
node.
Levels − Level of a node represents the generation of a node. If the root node
is at level 0, then its next child node is at level 1, its grandchild is at level 2,
and so on.
1.5 GRAPH
Edge − Edge represents a path between two vertices or a line between two
vertices. In the following example, the lines from A to B, B to C, and so on
represents edges. We can use a two-dimensional array to represent an array
as shown in the following image. Here AB can be represented as 1 at row 0,
column 1, BC as 1 at row 1, column 2 and so on, keeping other combinations
as 0.
Adjacency − Two node or vertices are adjacent if they are connected to each
other through an edge. In the following example, B is adjacent to A, C is
adjacent to B, and so on.
Path − Path represents a sequence of edges between the two vertices. In the
following example, ABCD represents a path from A to D.