Electricity Bill Payment Management Project

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

Cotton University

Hem Baruah Rd, Pan Bazaar, Guwahati, Assam 781001

A
Project On
“Electricity Bill Payment System”

Submitted By :
HS Arts & Science
Final Year, 2021-2023
GROUP 1
Christina Khakhlari (HSA21049, Arts)
Junak Saikia (HSS21075, Science)
INDEX

Title Page no.

1. Introduction

1.1 A Brief Overview of C++ Programming Language 1

1.2 Previous Knowledge Used in the Project 2

1.3 Project Description 3

2. Implementation & Output 4-9

3. Code Explanation 10

4. Advantages and Disadvantages 11

5. Conclusion 12
1

1. INTRODUCTION

1.1 A Brief Overview of C++ Programming Language

The C++ programming language was developed at AT&T Bell Laboratories in the
early 1980's by Bjarne Stroustrup, to help implement simulation projects in an
object-oriented and efficient way. As the name C++ implies, C++ was derived from
the C programming language, where ++ is the increment operator used in C. Ever
since its birth, C++ evolved to cope with problems encountered by users, and
through discussions at AT&T.
The major reason behind the success and popularity of C++ is that it supports object
oriented technology, the latest in the software development and the most near to the
real world.

C++ is not purely an object-oriented language but a hybrid that contains the
functionality of the C programming language. Thus, it has all the features available
in C :
● modular programmes that can be universally used
● closely efficient to machine programming
● portable programs for various platforms.

C++ supports the concept of object oriented programming, which are :


● data abstraction, that is, the creation of classes to describe objects
● data encapsulation for controlled access to object data
● inheritance by creating derived class
● polymorphism, that is, the implementation of instructions that can have
varying effects during program execution.
2

1.2 Previous Knowledge Used in the Project

To help us carry out the execution of the code in a better and understandable way, we
have put to use few of the basic facilities and built-in types provided by C++. Few of
the major facilities have been discussed below :

I. Structure is a collection of logically related variables referenced under one


name.

II. Function is a subprogram that acts on data and often returns a value. It makes
a program more readable and understandable to a programmer thereby
making program management much easier.

III. fstream library is a predefined set of operations for handling file related input
and output. It defines certain classes that help one perform file input and
output. For example, ifstream class ties a file to the program for input;
ofstream class ties a file to the program for output; and fstream class ties a file
to the program for both input and output.
3

1.3 Project Description

Our project “Electricity Bill Payment System” aims to analyse the consumption of
electricity of a customer and generate a bill thereafter. This mini project aims to
mimic the grassroot functions and comprises only the essential elements. It mainly
focuses on the calculation of units consumed during a month and the total amount
to be paid thereafter.
First, the user must successfully login into the system. After entering the required
details, the administrator adds the new customer, has the capacity to display the new
record and their bill is produced accordingly.
Admin features of this project are :
I. Add new record
II. Display record
III. Unit Tariff(in a month)
IV. Generate Bill
V. Exit
4

2. IMPLEMENTATION & OUTPUT

Source code -
5
6
7
8

Object Code -
9
10

3. CODE EXPLANATION

➢ All the required variables are declared in stuct customer.


➢ void display() function holds the title of the system.
➢ void login() function has been created for login purposes. If both username
and password values are “admin”, the user is allowed to enter into the system
and further access its features. If the login condition is fulfilled, it displays the
message “Login successful !”.
➢ void new_record() function does the job of taking in the input and displaying
the desired output respectively, concerning the new customer that is to be
added into the system. To use cout and cin, one must include the iostream
header file in the program.
Further this data is stored in a text file named “cust1.txt” made with
fstream class. fstream stream class supports both input and output operations
simultaneously. It inherits all the functions from istream and ostream classes
through iostream class defined inside iostream.h .
➢ In void display_record() , the text file associated with fstream is opened to
display its contents. while(!myfile.eof()) processes the file as long as eof() is
zero, that is, the end of the file is not reached.
➢ void calc() function is there to provide a better understanding on how the
total bill amount was reached.
➢ void generate_bill() function opens the text file in use, reads the entire
structure till the end of the file is reached to generate the required fields. It
takes the data from the text file and displays them.
➢ int main() calls for the display() and login() functions within it. The last part
of the code is the switch-case part, which consists of the different options of
interface with the respective function call.
11

4. ADVANTAGES & DISADVANTAGES

The advantages are as follows :


➢ It is easy to use and understand.
➢ It reduces paperwork.
➢ Customers do not have to wait in long queues.
➢ Information of customers is stored permanently.

The disadvantages are as follows :


➢ As this program performs only simple features, it is not fit for handling
complex processes.
➢ In case some changes are supposed to be made, customer records cannot be
modified.
12

5. CONCLUSION

In conclusion, this project aimed at developing an “Electricity Bill Payment System”


that maintains data such as adding a new record, calculation and generating a
payment bill. With this project, we learned the file concept and how to apply
structures too. This project gave us insight on how future projects are supposed to be
made.
Last but not the least , we are thankful to Dr. Saiful Islam for giving us this project.
We are also grateful for the sources that indirectly and directly helped us.

You might also like