12-06-2015, 02:36 PM
java code for supermarket billing system
This project is created in Visual C++ , because of suitability of this software for such type of Console Applications. The basic programming principle behind this application is the concepts of OOP’s i.e. Object oriented Programming.
OBJECT ORIENTED PROGRAMMING
OOP’s follow the concept of top to down approach and it is non procedural language. The main characteristics of object oriented programming are
Abstraction
Encapsulation
Inheritance
Polymorphism
ABOUT THE PROJECT "SUPER MARKET BILLING PROJECT"
Variables Used –
p_name[] – of type character array
This variable is used to store the name of the product. As the name of the product can contain characters or numbers hence character array is a suitable type for it.
Id[]-- of type character array
This variable is used to store the id of the product. As the id of the product can contain characters or numbers hence character array is a suitable type for it.
Type-- of type character
This variable is used to store the type of the product with the help of following specifications ---
C – COSMETIC
E - EDIBLE
G – MEDICINAL
D - DAILY USE
F - FOR OTHERS.
As the type of the product can only contain a single character hence character is a suitable type for it.
Vali— of type integer
This variable is used to dente the validity of the product.
Cost --- of type float
This is used to store the cost of the product, as the cost of product of the can be in decimal also hence data type float is used here.
Date –of type “ struct”
Since date has three parts – i.e. day, month and year.
Hence we use type “struct”, since structure can store the variables of different data types. But here we are only using the month and year for storing the manufacturing date of the product. The structure itself contain two more variables that are
m=of type integer for storing the month value.
y = of type integer for storing the year of the manufacturing of the product.
FUNCTIONS USED IN THIS PROJECT
I have used following functions in this Super Market Billing Project, I am explaining one by one.
Add() : to add the records.
Here concept of file handling is used for storing the data permanently. Whenever we want to retrieve the data from the file we can easily do it with the help of certain functions.
Here we use binary files to store the data because they are faster as compared to text files. Moreover they also require less space as compared to text files.
Here we use the object of class fstream for reading and writing the records from and into the file respectively.
If stream is used to read the records from the file and of stream is used to write records into the file.
First of all we open the file in the required mode using the file name as—
ofi.open("smr.dat", ios::binary | ios::app);
here smr.dat is the name of file ios tells us the type of the file and mode of opening the file ,app means append mode which means at the end of the file.
Whenever we add any record we always write at the end of the file hence using append mode for opening the file.
Using read and write functions we read and write records into the file and after performing the desired operations we close the file.
Search() function : for searching any record from the file
Using this function you can find the content store in file.
Modify() function : for modifying any record
This functions seems to be very helpful when we have to update a record or in the case when some wrong information is being added and to overwrite it.
Delete() function : to delete any record
This function is used when we want to delete any record or we permanent removal of any record from our database.
Display() function : to display the content
This function is used to display all the available records available in the file.
Main() function
As is the name of this function this is the main function of any c++ program . DOS first of all call this function and all the other functions being called by this function.
This provides us a menu of the whole project that what we can do and how, such as “press 1 for add the records “ , this line instruct the user that if he / she want to add any record ,
1 should be pressed , so in this way it provides a menu to the user and instruct the procedure and with the help of if else statement it calls the different functions defined above by comparing the user’s choice with the menu options.
SUPER MARKET BILLING PROJECT IN JAVA
Supermarket billing management system can be also developed in Java, It will be good choice because Java Provide a bunch of GUI API. Using these APIs you can make this project easily.
If you create Supermarket Billing Project in Java, It will cross platform. You can run this project in any Operating System (OS). I am interested to build this application in Java.
SUPER MARKET BILLING PROJECT IN PHP WITH MYSQL
Being a fan of Web Programming, I always choose Web Programming Languages (PHP, Python, Ruby on Rail) . But PHP with MySQL is the best combination. I always like to make any application
in PHP. Don't forgot it to check PHP Project ideas
The main advantage of using PHP is that It is made for Internet. Once you will write any software, Put it online. It will be available to use anyone in world wide web.
We will use five modules in this project
Module 1: Login–Id This module is made for the login of users. We know that we have 3 users so login-id is for: 1. Administrator 2. Data Entry Operator 3. Bill Calculating Operator
Module 2: Apply taxes and commissions This module is for administrator who will 1. Set the taxes for the products. 2. Set the commissions for the products.
Module 3: Check the Report This module is also for the administrator who can generate or check the report of the product and how many products are sold on particular date or in a period of time.
Module 4: Enter the information about products This module is for data entry operator who will 1. Enter which products come in the store. 2. Prices and expiry date of the product.
Module-5: Calculate the bill This module is for bill calculating operator who will 1. Calculate the bill. 2. Print it. - See more at: http://techshristi401/projectsupermarket-billing-system/#sthash.O9G7bdzB.dpuf