Professional Documents
Culture Documents
(Deemed to be University)
On
SUBMITTED BY:
2100031668 G. PRAVINYA
2100031681 M. AYAAN
2100031810 B. PRANAVI
Mr. B. ASHOK
KL UNIVERSITY
Green fields, Vaddeswaram – 522 502
Guntur Dt., AP, India.
DEPARTMENT OF BASIC ENGINEERING SCIENCES-1
CERTIFICATE
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.
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.
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-6: Stop
ALGORITHM FOR MODULE pEnq:
Step-1: Start
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
Step-4: Else find the pending nodes using checkDate() function and display them
Step-5: Stop
Step-7: Stop
FLOW CHARTS
IMPLEMENTATION
#include<stdio.h>
#include<stdlib.h>
struct pQueue{
int date;
int month;
int year;
float bill;
}*head=NULL,*current,*p,*q;
int d,m,y;
if(d2<d1)
if(m2==3)
d2=d2+29;
else
d2=d2+28;
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->next=NULL;
scanf("%f%d%d%d",¤t->bill,¤t->date,¤t->month,¤t-
>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;
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("--------------------------------------------------------------------------\n");
while(1){
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!
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.