Upload
abhijeet-kumar
View
303
Download
4
Embed Size (px)
Citation preview
8/11/2019 137128405 Supermarket Management System
1/82
INSTITUTE OF PROFESSIONAL EXELENCE
& MANAGEMENT
PROJECTON
SUPERMARKET MANAGEMENT SYSTEM
BY
SUNNY SINGH
Submitted to:
Mr. Abhishek Singh
Mrs. Luina Pani
8/11/2019 137128405 Supermarket Management System
2/82
Super Market Management
Page | 2
ACKNOWLEDGEMENT
We wish to express our sincere gratitude to our director sir COL. A.S.
Malhotra of INSTITUTE of PROFESSIONAL EXCELLENCE AND
MANAGEMENT for his support and Encouragement throughout the
project.
We are extremely great full to MR. TRIBHUVAN TYAGI H.O.D of BCA
DEPT. for her moral support and encouragement throughout the project.
We are extremely indebted to MR. ABHISHEK SINGH and MS. Luina
Pani for valuable guidance throughout the project.
We are also extremely grateful for all others who are not mentioned
above, for their advice and assistance.
P R O J E C T A S S O C I A T E S
8/11/2019 137128405 Supermarket Management System
3/82
Super Market Management
Page | 3
ABSTRACT
Supermarket management is a stand-alone J2EE using Eclipse Juno program.
This project contains all the necessary required information about maintaining
the supermarket billing system.
The core idea of this project to minimize the paper work and centralize the
data. Here all the communication is taken in secure manner. That is, in this
application the information will be stored in client itself. For further security the
data base is stored in the back-end oracle and so no intruders can access it.
This application basically consists of a home page in which it provides means to
various other section such as:
Customer details
Product details
Material and purchase order details
Banking details
It also contains the descriptive specifications about the individual categories
respectively.
8/11/2019 137128405 Supermarket Management System
4/82
Super Market Management
Page | 4
INTRODUCTION
1.1Overview
1.2
Purpose1.3Scope
1.4Existing System
1.5Proposed System1.6System Requirements
1.6.1 Hardware requirements
1.6.2 Software requirementsPrograms and s/w used
Page
no.
LITERATURE SURVEY
2.1
Introduction to user requirements2.2 User requirements
1.7Development Environment
ANALYSIS AND DESIGN
3.1 Analysis
3.2 Design
2.33.3 E-R Diagrams
IMPLEMENTATION DETAILS
4.1 Coding
4.2 Testing
SCREEN SHOTS
Conclusion
6.1 Observation
6.2 Advantage
6.3 Future Enhancement
Bibliography
8/11/2019 137128405 Supermarket Management System
5/82
Super Market Management
Page | 5
INTRODUCTION
8/11/2019 137128405 Supermarket Management System
6/82
Super Market Management
Page | 6
1.1 Overview
The project is on Supermarket management. Supermarket is the place where
customers come to purchase their daily using products and pay for that. So there is
a need to calculate how many products are sold and to generate the bill for the
customer.
In our project employee of the super market will enter the data and stores data into
database and they generate the bill to customer of purchased items.
1.2 Purpose
The main purpose of this project is to provide a user friendly interface commuters
to easily manage and retrieve the information.
In our project supermarket management we register employee and customer
information and store the information in database.
Maintains of database of all related forms.
Employee can make changes and generate the bill
8/11/2019 137128405 Supermarket Management System
7/82
Super Market Management
Page | 7
1.3 Scope:
This project aims at developing system software which would cater to the
needs of the people. So we aim to implement such a system that allows the user to
have the facility at any place and access the required information. It can be easily
customized as per the requirements and available resources to suit the needs of
different users
1.4 EXISTINGSYSTEM
Many Supermarkets use this type of billing system for a decade. It is also
Improved many times according to requirements of sellers and customers. It
Does the same work that is calculating the bill, gives it to the customer and
Maintain proper database. They are accurate in calculation and printing, they also
generate records.
A new concept is also added in the billing system is that they also maintain
Relationships with the customers who purchase more products from the store
regularly. System also concerns their requirements and gives them more
commission. It also shows the overall profit and profit on a particular product and
give repots which items are required and which have cross their expiry date..
8/11/2019 137128405 Supermarket Management System
8/82
Super Market Management
Page | 8
1.5 ProposedSystem
The drawback of the existing system is that it is very difficult to retrieve data
from case files. It is difficult to handle the whole system manually and it is less
accurate and to keep the data in case files for future reference because it may
get destroyed. Moreover it is very difficult to retrieve data. Redundancy of datamay occur and this may lead to the inconsistency. The manual system is so
time-consuming. The proposed system is very easy to operate. Speed and
accuracy are the main advantages of proposed system. There is no redundancy
of data. The data are stored in the computers secondary memories like hard
disk, etc. it can be easily receive and used at any time. The proposed system
will easily handle all the data and the work done by the existing systems. The
proposed systems eliminate the drawbacks of the existing system to a great
extent and it provides tight security to data.
8/11/2019 137128405 Supermarket Management System
9/82
Super Market Management
Page | 9
1.6 System Requirements
1.6.1 Hardware requirements
SERVER:
Processor : Pentium IV
Speed : 1.7 GHz
Memory Capacity : 1 GB
Hard Disk Capacity : 80 GB
1.6.2 Software Requirements
Operating System : Windows 2000 Professional
Web Server : Apache Tomcat Web Server
Database : MYSQL
Enterprise Application : J2EE,
Implementation Architecture : MVC,
3 Tier using Servlets, JSP
Scripting Languages : Java Script
Programming Language : Java
8/11/2019 137128405 Supermarket Management System
10/82
Super Market Management
Page | 10
1.7Programs and S/w used:
1.7.1 INTRODUCTION TO J2EE:
J2EE (Java 2 Platform, Enterprise Edition) is a Java platform designed for the
mainframe-scale computing typical of large enterprises. J2EE is also known as
Java EE, as subsequent versions have left behind the numeral. Designed J2EE to
simplify application development in a thin client tiered environment. J2EE
simplifies application development and decreases the need for programming and
programmer training by creating standardized, reusable modular components and
by enabling the tier to handle many aspects of programming automatically.
1.7.2 INTRODUCTION TO ECLIPSE JUNO:
Eclipse Juno began as an IBM Canada project. Object Technology
International (OTI), which had previously marketed the Smalltalk-based Visual
Age family of integrated development environment (IDE) products, developed the
new product as a Java-based replacement. a consortium was formed with a board
of stewards to further the development of Eclipse as open-source software.
8/11/2019 137128405 Supermarket Management System
11/82
Super Market Management
Page | 11
1.7.3 INTRODUCTION TO JSP:
JSP Stands for "Java Server Page." This standard was developed by Sun
Microsystems as an alternative to Microsoft's active server page (ASP) technology.JSP pages are similar to ASP pages in that they are compiled on the server, rather
than in a user's Web browser. After all, they don't call them "server pages" for
nothing. However, JSP is Java-based, whereas ASP is Visual Basic-based. JSP
pages are useful for building dynamic Web sites and accessing database
information on a Web server. Though JSP pages may have Java interspersed with
HTML, all the Java code is parsed on the server. Therefore, once the page gets to
the browser, it is only HTML. JavaScript, on the other hand, is usually parsed by
the Web browser, not the Web server.
1.7.4 INTRODUCTION TO CSS:
CSS CSS defines HOW HTML/JSP elements are to be displayed. CSS
describes the visual style (appearance, layout, color, fonts) of HTML/JSP
elements. CSS was designed to separate document layout from document content
(which greatly improved HTML/JSP flexibility and reduced HTML/JSP
complexity). CSS saves a lot of work! The CSS definitions are normally stored in
external files. This enables a web developer to change the appearance and layout of
every page in a web site, just by editing one single file! If you have ever tried to
change the style of all elements in all your HTML pages, you understand how you
can save a lot of work by storing the style definitions in an external file.
8/11/2019 137128405 Supermarket Management System
12/82
Super Market Management
Page | 12
1.7.5 INTRODUCTION TO JAVASCRIPT:
JavaScript is the scripting language of the Web. JavaScript is used in billions
of Web pages to add functionality, validate forms, communicate with the server,and much more. JavaScript is easy to learn. JavaScript (JS) is an interpreted
computer programming language. It was originally implemented as part of web
browsers so that client-side scripts could interact with the user, control the
browser, communicate asynchronously, and alter the document content that was
displayed. JavaScript was formalized in the ECMAScript language standard and is
primarily used as part of a web browser (client-side JavaScript). This enables
programmatic access to computational objects within a host environment.
1.7.6 INTRODUCTION TO SQL:
It is a database computer language designed for managing data in relation
database management system (RDBMS) and originally based upon relation
algebra. SQL is a declarative computer language for use with relation database. Its
scope includes data insert, query, update, delete, schema creation, Modification,
and data access control. It is the most widely used language for relation database.
8/11/2019 137128405 Supermarket Management System
13/82
Super Market Management
Page | 13
REQUIREMENTS
AND LITERATURE SURVEY
8/11/2019 137128405 Supermarket Management System
14/82
Super Market Management
Page | 14
2.1 INTRODUCTION TO REQUIREMENTS
Since efficient application of software engineering concept during development of
software is much required , the software requirement specification(srs) of a software project has
to be thought over without any margin for errors .this will not only help complete the project in
specified deadline, but also save precious resources as the implementation of the project
proceeds.
Srs is basically a complete description of the behavior of a software system that is being
developed.
It includes a set of use cases that describe all the interactions that describe all the interactions the
user will have with the software, these are known as functional requirements. The non-functional
requirements of the srs are used to impose constraints on the design and implements to maintain
quality standards or design constraints
2.2 USER REQUIREMENTS
The primary requirements of our project we already listed out in brief in introduction.
For development of our project super market management we have taken care for
choosing the right requirements based on our experience based on our experience interacting
with customers of our booking lounge where we considered their valuable inputs in our software
requirements specification to design an effective user friendly and application software
2.3 DEVELOPMENT ENVIROMENT
Choosing the right tools for development is critical for fast and efficient completion of
project to aid the development and implementation of our project, we did a survey of available
platforms, coding languages and tools and choose the one which met our requirements and had
support for an extensive set of libraries
8/11/2019 137128405 Supermarket Management System
15/82
Super Market Management
Page | 15
ANALYSIS AND DESIGN
8/11/2019 137128405 Supermarket Management System
16/82
Super Market Management
Page | 16
3.1Analysis:
Analysis is detailed study of the various operations performed by a system
and their relationship within and outside of the system. One aspect of analysis the
boundaries of the system and determining or not the system should consider the
other related system.
Structure analysis is a set of technique and graphical tools that allow the
analyst to develop a kind of system specification that are easily understandable to
the user. Its goal includes:
Usage of graphics would be helpful to communicate with the users.
Usage of logical system model will help user to familiarize the systemcharacteristic and inter-relationship before implementation.
Of course ER diagrams make it easy for the users to understand the flow of
data and control, but we have implemented the hierarchical structure to represent
the design structure of our project.
8/11/2019 137128405 Supermarket Management System
17/82
Super Market Management
Page | 17
3.2 DESIGN:
INTRODUCTION TO DESIGN PHASES:
Software design is actually a muti-step process, which focuses on four
attributes of a program, i.e, data structures, software architecture; interface
representation of the software that can be assessed for the quality before coding
begins. System study provides an understanding of the procedural detailsnecessary for implementing the system recommended in the feseaibility study.
Basically it is all about the creation of a new system. This is a critical phase since
it decides the quality of the system and has a major impact on testing and
implementation phases.
This system document is a reference regarding the development of this
project. This document gives all the details of the modules present in this project.
DESIGN OBJECTIVES AND PRINCIPLES:
The correctness of the design of a system depends on the level of precision of
the system built, which satisfies the requirements of the system. The aim of the
design is to produce the best possible design within the limitations imposed by the
requirements and facilities.
1. Verifiability.
2.
Traceability.3. Completeness.4.
Consistency.
5. Efficiency.6.
Simplicity.
The above mentioned properties would exhibit and integrate if the design
process were strictly followed during the development of the program.
8/11/2019 137128405 Supermarket Management System
18/82
Super Market Management
Page | 18
3.3 ER DIAGRAMS OR DATAFLOW DIAGRAM
1.
HOME PAGE
HOME PAGE
Customerdetails Item details
Purchase order lo out
Material arrivalProduct details
Bank account
Billing
8/11/2019 137128405 Supermarket Management System
19/82
Super Market Management
Page | 19
2.
CUSTOMER REGISTRATION FORM
Customer registration
Fname LnameEmail
Address
Gender password
Phone
8/11/2019 137128405 Supermarket Management System
20/82
Super Market Management
Page | 20
3.
PRODUCT FORM
SUPPLIER
NAME
PRODUCT
CODE
DATE
PRODUCT
NAME
QUANTITY
PRODUCT DETAILS
8/11/2019 137128405 Supermarket Management System
21/82
Super Market Management
Page | 21
4. ITEM DETAILS FORM
ITEM DETAILS
NAMECODE
MONTH/
YEAR
PRICECLOSING
STOCK
STOCK EXP DATE
MDATE
8/11/2019 137128405 Supermarket Management System
22/82
Super Market Management
Page | 22
5. MATERIAL ARRIVAL FORM.
MATERIAL ARRIVAL
ARR NOBILL NO
P ORDER
NO
ARR
DATE
STATUS
REC
VALUE
SUPPLIER
BILL
DATE
8/11/2019 137128405 Supermarket Management System
23/82
Super Market Management
Page | 23
6. PURCHASE ORDER FORM
PURCHASE ORDER
P ORDER
NO
DEL NOSUPPLIER
STATUSPO NO
DEL
MODE
PURC
ITEM
PURC
DATE
8/11/2019 137128405 Supermarket Management System
24/82
Super Market Management
Page | 24
7. BILLING FORM
COUNTER NOCUSTOMER IDNO
TOTAL ITEMS
AMOUNT PAIDDISCOUNTNET BILL
BILLING BILL AMOUNT
8/11/2019 137128405 Supermarket Management System
25/82
Super Market Management
Page | 25
8. BANK ACCOUNT FORM
BANK ACCOUNT
CHEQUE
DATE
BANK
NAME
CHEQUE
NO
C-ID NO
AMOUNT
8/11/2019 137128405 Supermarket Management System
26/82
Super Market Management
Page | 26
4. IMPLEMENTATION DETAILS
4.1 CODING
1.
Login form
Jsp:
Insert title here
User Name
Password
8/11/2019 137128405 Supermarket Management System
27/82
Super Market Management
Page | 27
New userSign
varfrmVal = newValidator("login");
frmVal.addValidation("uname","req","Please enter User Name");
frmVal.addValidation("uname","maxlen=15","Max length for User Name is 15");
frmVal.addValidation("pass","req","Please enter Password");frmVal.addValidation("pass","maxlen=8","Max length for Password 8");
8/11/2019 137128405 Supermarket Management System
28/82
Super Market Management
Page | 28
SERVLET
packagecom.megainfo.servlet;
importjava.io.IOException;importjava.util.ArrayList;
importjavax.servlet.ServletException;
importjavax.servlet.http.HttpServlet;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;
importjavax.servlet.http.HttpSession;
importcom.megainfo.model.LoginModel;
publicclassLoginServlet extendsHttpServlet {
privatestaticfinallongserialVersionUID= 1L;
protectedvoiddoPost(HttpServletRequest request, HttpServletResponse response)
throwsServletException, IOException {String name = request.getParameter("uname");
String pass = request.getParameter("pass");ArrayList list = newArrayList();
HttpSession session = request.getSession();
LoginModel lm = newLoginModel();
try{list = lm.loginModel(name, pass);
if(!list.isEmpty()){session.setAttribute("name", name);
8/11/2019 137128405 Supermarket Management System
29/82
Super Market Management
Page | 29
session.setAttribute("pass", pass);response.sendRedirect("welcome.jsp");
}else{
response.sendRedirect("invalid.jsp");}
} catch(Exception e) {
//e.printStackTrace();
}
}
}
8/11/2019 137128405 Supermarket Management System
30/82
Super Market Management
Page | 30
MODEL:
package com.megainfo.model;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import com.megainfo.common.DBConnection;
public class LoginModel {
private Connection con;
private Statement smt;
private ResultSet rs;
ArrayList list = new ArrayList();
public ArrayList loginModel(String name, String pass) throws Exception {
String dbname="";
String dbpass="";
con = DBConnection.getConnection();
System.out.println("LoginMode::loginMode - Connection success...");
8/11/2019 137128405 Supermarket Management System
31/82
Super Market Management
Page | 31
smt = con.createStatement();
System.out.println("LoginMode::loginMode - Statementcoustmer
created...");
rs = smt.executeQuery("select * from employee_table");
System.out.println("LoginMode::loginMode - Query exectued...");
while (rs.next()) {
dbname = rs.getString(5);
dbpass = rs.getString(6);
System.out.print(" LoginMode::loginMode - ResultSet..."+dbname);
If (dbname.equalsIgnoreCase(name)&& dbpass.equalsIgnoreCase(pass)) {
List.add(name);
List.add(pass);
break;
}}
return list;
}
public static void main(String[] args)throws Exception {
// TODO Auto-generated method stub
ArrayList list = new ArrayList();
LoginModel lm = new LoginModel();
list = lm.loginModel("srinivas", "123");
System.out.println(list);
}}
8/11/2019 137128405 Supermarket Management System
32/82
Super Market Management
Page | 32
WELCOME FORM
JSP:
td{
font-size: 30px;font-family:sans-serif;
padding-left: 20px;
}
Insert title here
8/11/2019 137128405 Supermarket Management System
33/82
Super Market Management
Page | 33
if(hrs
varmydate=newDate()varyear=mydate.getYear()
if(year < 1000)year+=1900
varday=mydate.getDay()varmonth=mydate.getMonth()
vardaym=mydate.getDate()if(daym
8/11/2019 137128405 Supermarket Management System
34/82
Super Market Management
Page | 34
Customer registration
Customer List
Edit Customer
Product
Item Details
MaterialArrival
PurchaseOrder
Billing
BANK A/C
LogOut
8/11/2019 137128405 Supermarket Management System
35/82
Super Market Management
Page | 35
PURCHASEORDERFORM
JSP
Insert title here
#tst{
table-layout: auto;display: table;
}td,h1{
color:white;}
PURCHASE ORDER
8/11/2019 137128405 Supermarket Management System
36/82
Super Market Management
Page | 36
PURCHASE ORDER NO:
smb23smb24
smb25
DELIVERY NO:smb12
smb13smb14
8/11/2019 137128405 Supermarket Management System
37/82
Super Market Management
Page | 37
SPORTSITEMOTHER
DELIVERY MODE:
TEMPO
PO VALUE:
8/11/2019 137128405 Supermarket Management System
38/82
Super Market Management
Page | 38
MATERIVAL ARRIVALFORM
JSP:
Insert title here
#tst{
table-layout: auto;display: table;
}
#tst{font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:100%;border-collapse:collapse;
}#tsttd,#tstth
{
font-size:1em;
border:1px solid #98bf21;padding:3px 7px 2px 7px;
color :white;}
#tstth
{
font-size:1.1em;
8/11/2019 137128405 Supermarket Management System
39/82
Super Market Management
Page | 39
text-align:left;padding-top:5px;
padding-bottom:4px;background-color:#A7C942;
color:#ffffff;}
#tsttr.alttd{
color:#000000;background-color:#EAF2D3;
}
MATERIAL ARRIVAL
ARRIVAL NO:
BILL NO:
PURCHASE ORDER NO:
ARRIVAL DATE:
8/11/2019 137128405 Supermarket Management System
40/82
Super Market Management
Page | 40
BILL DATE:
SUPPILER:
RECIEPT VALUE:
STATUS:
DeliveredRejected
varfrmVal = newValidator("mt");
frmVal.addValidation("ARRNO","req","Please enter arrival no");
8/11/2019 137128405 Supermarket Management System
41/82
Super Market Management
Page | 41
frmVal.addValidation("ARRNO","maxlen=5","Max length for Customer ID is 5");
frmVal.addValidation("BILLNO","req","Please enter billno");frmVal.addValidation("BILLNO","maxlen=15","Max length for Check-in-date is
15");
frmVal.addValidation("PONO","req","Please enter purchase order no");frmVal.addValidation("PONO","maxlen=15","Max length Check-out-date is 15");
frmVal.addValidation("ARRDATE","req","Please enter the arrival date");
frmVal.addValidation("ARRDATE","maxlen=3","Max length for Total no ofmembers travelling is 3");
frmVal.addValidation("BILLDATE","req","Please enter bill date");
frmVal.addValidation("BILLDATE","maxlen=15","Max length for Total amountcharged 15");
frmVal.addValidation("SUPP","req","Please enter supplier");
frmVal.addValidation("SUPP","maxlen=15","Max length for Total amountcharged 15");
frmVal.addValidation("RECVAL","req","Please enter reciept value");
frmVal.addValidation("RECVAL","maxlen=15","Max length for Total amount
charged 15");
frmVal.addValidation("STATUS","req","Please enter status");
frmVal.addValidation("STATUS","maxlen=15","Max length for Total amountcharged 15");
8/11/2019 137128405 Supermarket Management System
42/82
Super Market Management
Page | 42
PRODUCT FORM:
JSP:
PRODUCT FROM
#tst{table-layout: auto;display: table;
}
PRODUCT FORM
PRODUCT NAME:
8/11/2019 137128405 Supermarket Management System
43/82
Super Market Management
Page | 43
DATE:
SUPPILER NAME:
PRODUCT CODE:
QUANTITY:
varfrmVal = newValidator("pro");
frmVal.addValidation("PDNO","req","Please enter Product no");frmVal.addValidation("PDNO","maxlen=5","Max length for Customer ID is 5");
frmVal.addValidation("DATE","req","Please enter the date");
frmVal.addValidation("DATE","maxlen=15","Max length for Check-in-date is15");
frmVal.addValidation("SUPPNAME","req","Please enter the supplier name");
frmVal.addValidation("SUPPNAME","maxlen=15","Max length Check-out-date
is 15");
8/11/2019 137128405 Supermarket Management System
44/82
Super Market Management
Page | 44
frmVal.addValidation("PROCD","req","Please enter the product code");frmVal.addValidation("PROCD","maxlen=3","Max length for Total no of
members travelling is 3");
frmVal.addValidation("QUAN","req","Please enter the quantity");frmVal.addValidation("QUAN","maxlen=15","Max length for Total amount
charged 15");
8/11/2019 137128405 Supermarket Management System
45/82
Super Market Management
Page | 45
SERVLET
package com.megainfo.servlet;
import java.io.IOException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.megainfo.model.ProductModel;import com.megainfo.model.RegisterModel;
public class Productservlet extends HttpServlet {private static final long serialVersionUID = 1L;
public Productservlet() {
super();
protected void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
String PDNO = request.getParameter("PDNO");String DATE = request.getParameter("DATE");
String SUPPNAME = request.getParameter("SUPPNAME");String PROCD = request.getParameter("PROCD");
String QUAN = request.getParameter("QUAN");
ProductModel pm = new ProductModel();try {
boolean flag = pm.ProductModel( PDNO, DATE, SUPPNAME, SUPPNAME,QUAN );
if (flag) {
response.sendRedirect("Databasesucess.jsp");
} else {
8/11/2019 137128405 Supermarket Management System
46/82
Super Market Management
Page | 46
response.sendRedirect("register_failed.jsp");}
} catch (Exception e) {//
e.printStackTrace();}
}}
8/11/2019 137128405 Supermarket Management System
47/82
Super Market Management
Page | 47
MODEL
package com.megainfo.model;
import java.sql.Connection;import java.sql.ResultSet;
import java.sql.Statement;import java.util.ArrayList;
import com.megainfo.common.DBConnection;
public class PURCHASEMODEL {
private Connection con;
private Statement smt;int i;
ArrayList list = new ArrayList();boolean flag;
public boolean PURCHASEMODEL(String PONO, String DELNO,String SUPP, String STATUS, String PODATE, String PURITEM,StringDELMODE,String POVALUE)
throws Exception {String query = "insert into purchasemodel`
(`PONO`,`DELNO`,`SUPP`,`STATUS`,`PODATE`,`PURITEM`,`DELMODE`,`POVALUE`) values
('"+PONO+"','"+DELNO+"','"+SUPP+"','"+STATUS+"','"+PODATE+"','"+PURIT
EM+"','"+DELMODE+"','"+POVALUE+"')";
con = DBConnection.getConnection();System.out.println("purchasemodel::loginMode - Connection success...");
smt = con.createStatement();System.out.println("purchasemodel::loginMode - Statement created...");
System.out.println("PONO "+PONO+" DELNO "+DELNO+" SUPP "+SUPP+"
STATUS "+STATUS+" PODATE "+PODATE+" PURITEM "+PURITEM+"
DELMODE "+DELMODE+" POVALUE "+POVALUE+" ");
8/11/2019 137128405 Supermarket Management System
48/82
Super Market Management
Page | 48
i = smt.executeUpdate(query);System.out.println("LoginMode::loginMode - Query exectued..." + i);
if (i == 1) {flag = true;
} else {flag = false;
}return flag;
}
8/11/2019 137128405 Supermarket Management System
49/82
Super Market Management
Page | 49
REGISTRATION SUCCESS
JSP:
Insert title here
Thanks you have registered successfully! BACK
8/11/2019 137128405 Supermarket Management System
50/82
Super Market Management
Page | 50
INVALID USER
JSP:
Insert title here
Sorry Invalid user!Try again
8/11/2019 137128405 Supermarket Management System
51/82
Super Market Management
Page | 51
LOGOUT
JSP
Insert title here
Thanks, You have successfully logged out!!
8/11/2019 137128405 Supermarket Management System
52/82
Super Market Management
Page | 52
NO_RECORDS
JSP:
Insert title here
Sorry No records!!
Go Back
8/11/2019 137128405 Supermarket Management System
53/82
Super Market Management
Page | 53
UPDATE CUSTOMER
JSP:
Insert title here
Employee No
First NameLast Name
PhoneGender
Address
8/11/2019 137128405 Supermarket Management System
54/82
Super Market Management
Page | 54
8/11/2019 137128405 Supermarket Management System
55/82
Super Market Management
Page | 55
SERVLET
package com.megainfo.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.megainfo.model.Deletecoustmermodel;
import com.megainfo.model.UpdatecoustmerModel;
/**
* Servlet implementation class UpdateEmpServlet
*/
public class UpdatecoustmerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
8/11/2019 137128405 Supermarket Management System
56/82
Super Market Management
Page | 56
public UpdatecoustmerServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// TODO Auto-generated method stub
String empnumber = request.getParameter("empnumber");
String fname = request.getParameter("fname");
String lname = request.getParameter("lname");
String email = request.getParameter("email");
String phone = request.getParameter("phone");
String gender = request.getParameter("gender");
String address = request.getParameter("address");
System.out.println("UpdatecoustmerServlet:doGet() : emp_nois
"+empnumber);HttpSession session = request.getSession();
UpdatecoustmerModel dm = new UpdatecoustmerModel();
boolean flag=false;
try {
8/11/2019 137128405 Supermarket Management System
57/82
Super Market Management
Page | 57
flag = dm.updatecoustmerModel(empnumber, fname, lname, email, phone,gender, address);
if (flag) {
response.sendRedirect("coustmer_update_success.jsp");
} else {
response.sendRedirect("no_records.jsp");
}
} catch (Exception e) {
e.printStackTrace();
}
}
8/11/2019 137128405 Supermarket Management System
58/82
Super Market Management
Page | 58
MODEL
package com.megainfo.model;
import java.sql.Connection;
import java.sql.Statement;
import java.util.ArrayList;
import com.megainfo.common.DBConnection;
public class UpdatecoustmerModel {
private Connection con;
private Statement smt;
int i;
ArrayList list = new ArrayList();boolean flag;
public boolean updatecoustmerModel(String coustmernumber, Stringfname,String lname,String email,String phone,String gender, String address)
throws Exception {
String query = "UPDATE coustmer_table SET
fname='"+fname+"',lname='"+lname+"',email='"+email+"',
phone='"+phone+"',gender='"+gender+"', address='"+address+"' WHEREemp_no='"+coustmernumber+"';";
con = DBConnection.getConnection();
System.out.println("RegisterModel::loginMode - Connection success...");
smt = con.createStatement();
8/11/2019 137128405 Supermarket Management System
59/82
Super Market Management
Page | 59
System.out.println("RegisterModel::loginMode - Statement created...");
i = smt.executeUpdate(query);
System.out.println("LoginMode::loginMode - Query exectued..." + i);
if (i == 1) {
flag = true;
} else {
flag = false;
}
return flag;
}
8/11/2019 137128405 Supermarket Management System
60/82
Super Market Management
Page | 60
4.2 TESTING:
Scope of testing: once the code has been generated, the next task is testing.
Testing process mainly focuses on logical internals of the software, ensuring that
all statements are correct and ensure that defined input will produce an actual result
that is same as the expected results.
Test plan: testing process is divided into the following phases:
Unit testing: It tests whether the data saves to all units of the databse
properly.
Module testing: It tests all the modules created satisfies the user and
management.
System testing: It tests the system so that it will not harm or change othersoftware or hardware indulging in the process.
Acceptance testing: It plays the most important part, as it tests and verifies
that the software created is acceptable by the creator, user and the customer.
It checks for the fulfillments of all the requirements and is accepted by
everyone.
The following criteria and the corresponding tests are applied for each test phase:
Inter face integrity: internal and external interfaces are tested as each module
and are incorporated into the structure.
Functional validity: test designed to uncover functional errors are conducted.
Information content: test designed to uncover errors associated with
local/global data structures are conducted.
Performance: test designed to verify Performance bounds established during
design are conducted.
Environment and resources: testing designed to cheek the adaptability of the
software on different environment.
8/11/2019 137128405 Supermarket Management System
61/82
Super Market Management
Page | 61
5. SCREEN SHOTS
8/11/2019 137128405 Supermarket Management System
62/82
Super Market Management
Page | 62
1. EMPLOYEE REGISTER FORM:
8/11/2019 137128405 Supermarket Management System
63/82
Super Market Management
Page | 63
2.REGISTER SUCCESSFUL FORM.
8/11/2019 137128405 Supermarket Management System
64/82
Super Market Management
Page | 64
3. LOGIN FORM.
8/11/2019 137128405 Supermarket Management System
65/82
Super Market Management
Page | 65
4. HOME FORM
8/11/2019 137128405 Supermarket Management System
66/82
Super Market Management
Page | 66
5. Customer Registration
8/11/2019 137128405 Supermarket Management System
67/82
Super Market Management
Page | 67
6. UPDATE CUSTOMER FORM.
8/11/2019 137128405 Supermarket Management System
68/82
Super Market Management
Page | 68
7.PRODUCT FORM
8/11/2019 137128405 Supermarket Management System
69/82
Super Market Management
Page | 69
8. ITEM DETAILS FORM
8/11/2019 137128405 Supermarket Management System
70/82
Super Market Management
Page | 70
9. MATERIAL ARRIVAL
8/11/2019 137128405 Supermarket Management System
71/82
Super Market Management
Page | 71
10.PURCHASE ORDER FORM
8/11/2019 137128405 Supermarket Management System
72/82
Super Market Management
Page | 72
11. BILLING FORM
8/11/2019 137128405 Supermarket Management System
73/82
Super Market Management
Page | 73
12. BANK ACCOUNT
8/11/2019 137128405 Supermarket Management System
74/82
Super Market Management
Page | 74
13. details saved form
8/11/2019 137128405 Supermarket Management System
75/82
Super Market Management
Page | 75
14. logout form
8/11/2019 137128405 Supermarket Management System
76/82
Super Market Management
Page | 76
5.2 Database Tables:
1.BANKTABLE
2. BILLTABLE
8/11/2019 137128405 Supermarket Management System
77/82
Super Market Management
Page | 77
3. CUSTOMER TABLE
4. EMPLOYEETABLE
8/11/2019 137128405 Supermarket Management System
78/82
Super Market Management
Page | 78
5. ITEM TABLE
6.MATERIAL TABLE
8/11/2019 137128405 Supermarket Management System
79/82
Super Market Management
Page | 79
7.PRODUCT TABLE
8.PURCHASE TABLE
8/11/2019 137128405 Supermarket Management System
80/82
Super Market Management
Page | 80
CONCLUSION
8/11/2019 137128405 Supermarket Management System
81/82
Super Market Management
Page | 81
6.1 Observations:
By looking at our project can observe some positive as well as some
negative factors. This project of SMB using J2EE and SQL was developed from
exam point of view. Many observations can be seen in this project. Some of the
important features provided in this project are;
Eclipse for J2EE
Concept of links to J2EE and SQL
Structured query language.
6.2 Advantage:
Very simple
Fast. Provides high capacity.
Security for the information is provided.
Centralized and persistent data storage.
Visa processing system will in turn help in providing jobs.
6.3 Future Enhancement:
The project has a huge potential for expansion.
New information on all the specified categories can be updated.
We can make the GUI much clear and interactive by customization.
The HPM system can be made more secure by having a secret key sharing
for the unlocking the visa process.
8/11/2019 137128405 Supermarket Management System
82/82
Super Market Management
BIBLIOGRAPHY
We would like to specify the names of some guides, books and websites which
have paid us a lot and have helped us to complete this project.
1.
J2EE available athttp://en.wikipedia.org/wiki/J2EE.
2. Text book of HTML and INTERNET TECHNOLOGY for Vth sem
BSc.3. Our J2EE certificate course guide Mr. Ramesh M Karuti.4.
SQL table codes athttp://www.w3schools.com/sql/default.asp.
5. JSP codes and format available atwww.softcodes.com.6.
Wikipedia a free encyclopedia for codes and softwares.
http://en.wikipedia.org/wiki/J2EEhttp://en.wikipedia.org/wiki/J2EEhttp://en.wikipedia.org/wiki/J2EEhttp://www.w3schools.com/sql/default.asphttp://www.w3schools.com/sql/default.asphttp://www.w3schools.com/sql/default.asphttp://www.softcodes.com/http://www.softcodes.com/http://www.softcodes.com/http://www.softcodes.com/http://www.w3schools.com/sql/default.asphttp://en.wikipedia.org/wiki/J2EE