You are on page 1of 23

Koneru Lakshmaiah Education Foundation

(Deemed to be University)

FRESHMAN ENGINEERING DEPARTMENT


A Project Based Lab Report

On

BILL NOTIFICATION SYSTEM

SUBMITTED BY:

I.D NUMBER NAME

2100031668 G. PRAVINYA

2100031681 M. AYAAN

2100031771 T. NIKHIL KUMAR

2100031810 B. PRANAVI

UNDER THE GUIDANCE OF

Mr. B. ASHOK

Assistant Professor, CSE.

KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES-1

CERTIFICATE

This is to certify that the project based laboratory report entitled


BILL NOTIFICATION SYSTEM submitted by Mr./Ms. G. PRAVINYA, M. AYAAN, T.
NIKHIL KUMAR, B. PRANAVI bearing Regd. No. 2100031668, 2100031681,
2100031771, 2100031810 to the Department of Basic Engineering Sciences-1, KL
University in partial fulfillment of the requirements for the completion of a project based
Laboratory in “DESIGN OF DATA STRUCTURES ”course in I B Tech II Semester, is a
bonafide record of the work carried out by them under my supervision during the academic
year 2021 – 2022.

PROJECT SUPERVISOR HEAD OF THE


DEPARTMENT

Mr. B. Ashok Dr. D. Haritha


ACKNOWLEDGEMENTS

It is great pleasure for us to express our gratitude to our honorable President Sri.
Koneru Satyanarayana, for giving the opportunity and platform with facilities in
accomplishing the project based laboratory report.

We express the sincere gratitude to our Director Dr. A.Jagadeesh for his
administration towards our academic growth.

We express sincere gratitude to HOD-BES-1 Dr. D.Haritha for her leadership and
constant motivation provided in successful completion of our academic semester. We record
it as my privilege to deeply thank for providing us the efficient faculty and facilities to make
our ideas into reality.

We express my sincere thanks to our project supervisor Mr. B. Ashok for his 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.

2100031668 G. PRAVINYA

2100031681 M. AYAAN

2100031771 T. NIKHIL
KUMAR

2100031810 B. PRANAVI
ABSTRACT

This project is developed to take the records of bills and arrange them in the priority queue
according to their due dates and display pending bills.

The user need to input the bill amounts and the due dates in the console and these will be
stored according to their due dates in the priority queue.

When the user select the option to display pending bills, he/she need to give the present date
in the console and all pending bills till that date will be displayed along with the difference
between present day and due date of that particular bill.
INDEX
S.NO TITLE PAGE NO
1 Introduction 1
2 Aim of the Project 3
2.1 Advantages & Disadvantages 3
2.2 Future Implementation 3
3 Software & Hardware Details 4
4 Class Diagram 5
5 Algorithm for each module 8
6 Implementation 10
7 Integration and System Testing 15
8 Conclusion 17

INTRODUCTION
In this project we are using following language and components.

C Language:
C is a procedural programming language. It was mainly developed as a system
programming language to write an operating system.

Loops:
A loop statement allows us to execute a statement or group of statements
multiple times. Loop control statements change execution from its normal sequence.
When execution leaves a scope, all automatic objects were created in that scope are
destroyed.

If-else Statement:
The if-else statement in C language is used to execute the code if condition is true or
false. It is also called two-way selection statement.

Syntax:

if(expression){
//code to be executed if condition is true
}
else{
//code to be executed if condition is false
}

Switch Statement:
The switch statement allows us to execute one code block among many alternatives.
The expression is evaluated once and compared with the values of each case label. If we do
not use the break statement, all statements after the matching label are also executed.

Pointers:
The pointer in C language is a variable which stores the address of another variable.
This variable can be of type int, char, array, function, or any other pointer. The size of the
pointer depends on the architecture.

Structures:
A structure is a key word that create user defined data type in C. A structure creates a
data type that can be used to group items of possibly different types into a single type.

Dynamic Memory Allocation:


The concept of dynamic memory allocation in c language enables the C programmer
to allocate memory at runtime. Dynamic memory allocation in c language is possible by 4
functions of stdlib.h header file.

Priority Queue:
A priority queue is a special type of queue in which each element is associated with a
priority value. And, elements are served on the basis of their priority. That is, higher priority
elements are served first. However, if elements with the same priority occur, they are served
according to their order in the queue.
AIM

To develop a program to take bill amounts and due dates as input and print the
pending bills according to present date given by using priority queues.

Advantages:-
Alerts are given to users if they have any pending bills based on the current date.

Disadvantages:-
It gives a alert only one time and not applicable to set remainders. It gives alerts only
about the pending bills but not the bills that are needed to pay.

Future Enhancements:-
We need to develop a program which stores the bills data permanently and delete
them when they are paid. Also, it need to give multiple remainders to alert the user
about the pending bill. It should also give a alert about the bills that are needed to pay
the following day.

SYSTEM REQUIREMENTS

 SOFTWARE REQUIREMENTS:
The major software requirements of the project are as follows:
Language : C
Operating System: Windows Xp or later.

 HARDWARE REQUIREMENTS:
The hardware requirements that map towards the software are as follows:

RAM : 8GB

Processor : i5
ALGORITHM
ALGORITHM FOR MODULE MAIN:
Step-1: Start

Step-2: Read ch

Step-3: If ch is 1, control go to function pEnq()

Step-4: If ch is 2, control go to display()

Step-5: If ch is 3, program will terminate

Step-6: Stop
ALGORITHM FOR MODULE pEnq:
Step-1: Start

Step-2: Read current->bill, current->date, current->month, current->year

Step-3: If head is null, assign current to head

Step-4: Else if checkDate() function return 1 for current date and first node date, assign head
to current->next and assign current to head

Step-5: Else traverse the priority queue and insert the current node in its position by using
checkDate() function

Step-6: Stop

ALGORITHM FOR MODULE display:


Step-1: Start

Step-2: Read pd, pm, py

Step-3: If head is null, print empty

Step-4: Else find the pending nodes using checkDate() function and display them

Step-5: Stop

ALGORITHM FOR MODULE checkDate:


Step-1: Start

Step-2: If d2<d1, add 28 or 29 or 30 or 31 days to d2 according to m2 and y2.And decrease


m2 by 1

Step-3: If m2<m1, decrease y2 by 1 and add 12 to m2

Step-4: Find y=y2-y1, m=m2-m1, d=d2-d1

Step-5: Return -1 if y<0 or m<0 or d<0

Step-6: Else return 1

Step-7: Stop
FLOW CHARTS
IMPLEMENTATION
#include<stdio.h>

#include<stdlib.h>

struct pQueue{

int date;

int month;

int year;

float bill;

struct pQueue *next;

}*head=NULL,*current,*p,*q;

int d,m,y;

int checkDate(int d1,int m1,int y1,int d2,int m2,int y2)

if(d2<d1)

if(m2==3)

if(y2%100!=0 && y2%4==0 || y2%400==0)

d2=d2+29;

else

d2=d2+28;

else if(m2==5 || m2==7 || m2==10 || m2==12)


d2=d2+30;

else

d2=d2+31;

m2=m2-1;
}

if(m2<m1)

y2=y2-1;

m2=m2+12;

y=y2-y1;

m=m2-m1;

d=d2-d1;

if(y<0||m<0||d<0)

return -1;

else

return 1;

void pEnq(){

current=(struct pQueue*)malloc(sizeof(struct pQueue));

current->next=NULL;

printf("enter bill,due date,month,year:");

scanf("%f%d%d%d",&current->bill,&current->date,&current->month,&current-
>year);

if(head==NULL)

head=current;

else if(checkDate(current->date,current->month,current->year,head->date,head-
>month,head->year)==1){

current->next=head;
head=current;

else{

p=head;

q=head;

while(p!=NULL&&(checkDate(p->date,p->month,p->year,current-
>date,current->month,current->year)==1)){

q=p;

p=p->next;

current->next=p;

q->next=current;

printf("\n");

void display(){

int pd,pm,py;

printf("enter present date,month,year:");

scanf("%d%d%d",&pd,&pm,&py);

if(head==NULL)

printf("empty!\n");
else{

p=head;

while(p!=NULL){

if(checkDate(p->date,p->month,p->year,pd,pm,py)==1)
printf("bill of %.2f is pending by %d yrs %d months %d
days!\n",p->bill,y,m,d);

p=p->next;

int main(){

int ch;

printf("--------------------------------------------------------------------------\n");

printf(" -BILL NOTIFICATION SYSTEM- \n");

printf("--------------------------------------------------------------------------\n");

while(1){

printf("\n1.Add a new bill 2.Display pending bills 3.exit\n");

printf("enter choice:");

scanf("%d",&ch);

switch(ch){

case 1:pEnq();

break;

case 2:display();

break;

case 3:exit(0);

default:printf("invalid choice!\n");

}
return 0;

RESULTS
INPUTS
1

100 23 4 2022

200 2 4 2020

300 6 7 2023

28 4 2022

OUTPUTS
bill of 200.00 is pending by 2 yrs 0 months 26 days!

bill of 100.00 is pending by 0 yrs 0 months 5 days!

SCREEN SHOTS:
CONCLUSION
People often forget about the bills they need to pay their bills. This bill notification
system can help to remind them about their payments. It can be further implemented by
connecting to a database and generating automated alerts to users.

You might also like