Final Cheak ACHAL's Project

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

A PROJECT REPORT ON

“SUPERMARKET BILLING SYSTEM”

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMEN FOR THE


AWARD OF THE DGREE BECHLORE OF COMPUTER APPLICATION

SESSION :2023-2024

Project Guide Name Submitted BY


External Guide (if any) : Achal Jain
None Enrollment No:
AX147246010
Internal Guide : Study Institute code No:
Harsh Vaish 7246
(BCA Faculty)

Submitted to
Makhanlal Chaturvedi National University of
Journalism and Communication, Bhopal
EXTOL INSTITUTE OF COMPUTER SCIENCE

Project Certificate
This is to certify that the project report entitled “SUPERMARKET BILLING
SYSTEM”
submitted to Makhanlal Chaturvedi National University of Journalism &
Communication, in partial fulfillment of the requirement for the award of the degree of
BACHELOR OF COMPUTER APPLICATIONS (BCA), is original work carried out
by myself Mr. Achal Jain with
enrolment no.AX147246010 Under the Supervision of Prof. Harsh Vaish.

The matter embodied in this project is genuine work done by myself and has not been
submitted whether to this University or to any other University / Institute for the
fulfillment of the requirement of any course of study.

Date: .…/……/……
Name & Signature of the Student

………………......... …………….……

Contact Details (Email &Phone)


aadijain0095@gmail.com

Number: 9981398541

Verified by the Supervisor


Name & Signature of the Supervisors

…………………….. ………………….

Date: ........./……/…….
Acknowledgement

This Major Project is the result of contribution of many minds. I would like to
acknowledge and thank my project guide HARSH SIR for his valuable support and
guidance. He guided me through the process from conception and till the completion of
this project. I would also like to thanks my class institute director KAMLESH SIR and
my all my faculties JAMEEL SIR. I thank to lab staff members and other non-teaching
members.
I am very thankful for the open-handed support extended by many people.
While no list would be complete, it is my pleasure to acknowledge the assistance of my
friends who provided encouragement, knowledge and constructive suggestions.

Signature of Student
Name: Achal Jain
Roll No:
Enrollment No:AX147246010
Self-Certificate

This is to certify that the Major Project report entitled “SUPERMARKET BILLING
SYSTEM “is done by me, and it is authentic work carried out for the partial fulfillment
of the requirements for the award of the degree of Bachelor of Computer Application
(BCA) under the guidance of “HARSH SIR”. The matter and software embodies in this
project has not been submitted earlier for award of any degree or diploma to the best of
my knowledge and believes.

Signature of Student
ACHAL JAIN
Roll No:
Enrollment No: AX147246010
ABSTRACT

The Supermarket Billing System ensures data integrity and


confidentiality through various security measures. User authentication
mechanisms are implemented to restrict access to authorized personnel
only. Access controls are enforced to limit privileges based on user roles,
preventing unauthorized modifications or deletions of sensitive data.

Furthermore, the system employs encryption techniques to safeguard


data transmission over networks, preventing interception by
unauthorized parties. Regular security audits and updates are performed
to address potential vulnerabilities and ensure compliance with industry
standards and regulations.

Moreover, audit trails and logging mechanisms are integrated into the
system to track user activities and detect any suspicious behavior or
unauthorized access attempts. This proactive approach enhances the
overall security posture of the supermarket billing system, instilling trust
and confidence among users and stakeholders.
This application basically consists of a home page in which it provides
means to various other sections such as:

➢ Customer details
➢ Product details
➢ Material and purchase order details
➢ Banking details
➢ Bill generator

It also contains the descriptive specifications about the individual


categories respectively
INTRODUCTION Page no.
1.1Overview
1.2Purpose
1.3Scope
1.4Existing System
1.5Proposed System
1.6System Requirements
1.6.1 Hardware requirements
1.6.2 Software requirements
Programs and s/w used
LITERATURE SURVEY
2.1Introduction to user requirements
2.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
INTRODUCTION
1.1 Overview

The project is on Supermarket billing system. 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.
In addition to storing data and generating bills, the supermarket billing system
can offer several other functionalities to streamline operations and enhance
customer experience. Here are a few features that can be included:

1. Inventory Management: The system can keep track of the supermarket's


inventory, automatically updating product quantities as they are sold. This helps
in ensuring that popular items are always in stock and alerts staff when items
need to be reordered.

2. Product Catalog: A comprehensive catalog of all the products available in


the supermarket can be maintained within the system. This catalog can include
details such as product name, description, price, and barcode for easy scanning
during checkout.

3. Barcode Scanning: Integration with barcode scanners allows for quick and
accurate entry of products during checkout. These speeds up the billing process
and reduces the chances of errors.

4. Multiple Payment Options: The system can support various payment


methods including cash, credit/debit cards, mobile payments, and even loyalty
points if applicable. This provides flexibility to customers and enhances
convenience.

5. Promotions and Discounts: The system can apply discounts and promotions
automatically based on predefined rules or promotional campaigns. This
encourages customer loyalty and increases sales.

6. Customer Loyalty Program: Implementation of a loyalty program where


customers earn points for every purchase can be integrated into the system.
Customers can redeem these points for discounts or free products, incentivizing
repeat purchases.

7. Reporting and Analytics: The system can generate reports on sales


performance, popular products, peak hours, and other key metrics. This data can
be used by supermarket management to make informed decisions and optimize
operations.

8. Customer Relationship Management (CRM): The system can store


customer information and purchase history, allowing staff to provide
personalized service and targeted marketing campaigns.

By incorporating these features, the supermarket billing system becomes a


powerful tool for managing operations efficiently, improving customer
satisfaction, and driving revenue growth.

1.2 Purpose
The main purpose of this project is to provide a user-friendly interface
commuter to easily manage and retrieve the information.
➢ In our project supermarket billing system, 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

The main purpose of this project is to develop a user-friendly interface


that facilitates commuters in managing and retrieving information related
to their commute. Here's an elaboration on what this entails:

1. User-Friendly Interface: The interface should be intuitive and easy to


navigate, catering to users of varying technological proficiency. This
involves employing clear layout designs, easily recognizable icons or
buttons, and logical navigation paths.

2. Information Management: Commuters often require access to


various types of information related to their commute, such as schedules,
routes, delays, and updates. The project aims to centralize and organize
this information effectively within the interface, making it easily
accessible to users.

3. Real-Time Updates: Providing real-time updates is crucial for


commuters to stay informed about any changes or disruptions in their
commute. This may include live tracking of transportation vehicles,
notifications about delays or cancellations, and alternative route
suggestions in case of emergencies or detours.
4. Personalization: The interface should allow users to personalize their
experience according to their preferences and frequently used routes. This
could involve features like saving favorite routes, setting up alerts for
specific times or locations, and customizing display settings.

5. Multi-Platform Accessibility: To cater to a wider audience, the


project should ideally be accessible across multiple platforms, including
desktop computers, smartphones, and tablets. This ensures that
commuters can access the interface conveniently regardless of their
device.

6. Feedback Mechanism: Implementing a feedback mechanism allows


users to provide input about their experience with the interface. This
feedback can be valuable for identifying areas for improvement and
enhancing the overall user experience.

7. Integration with Existing Systems: Depending on the scope of the


project, integration with existing transportation systems or databases may
be necessary to retrieve accurate and up-to-date information. This could
involve collaborating with relevant authorities or utilizing APIs provided
by transportation agencies.

Overall, the project's primary goal is to empower commuters by


providing them with a seamless and efficient means of managing their
commute-related information, ultimately enhancing their overall
commuting experience.
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

The development of this system software is centered around catering to the


diverse needs of users by providing a versatile platform accessible from any
location. By implementing a cloud-based architecture, users can access the
system and its features from various devices with internet connectivity, ensuring
flexibility and convenience.

Customization lies at the core of the system's design philosophy, allowing users
to tailor their experience to meet specific preferences and requirements.
Whether it's adjusting settings, configuring notifications, or personalizing the
interface layout, users have the autonomy to mold the system to suit their
individual needs.

Moreover, the system is designed to adapt to the available resources and


technological capabilities, ensuring compatibility with different devices,
operating systems, and network infrastructures. This adaptability ensures that
users from diverse backgrounds and technological environments can seamlessly
integrate the system into their daily routines.
Accessibility is a key focus of the system's development, with user-friendly
interfaces and intuitive navigation paths designed to accommodate users of all
skill levels. Whether it's a seasoned commuter or someone new to the interface,
the system strives to provide an intuitive and hassle-free experience for all
users.

In addition to catering to individual users, the system also offers scalability and
extensibility to accommodate the needs of organizations, businesses, and public
agencies. This scalability allows the system to grow and evolve alongside the
expanding user base and changing requirements, ensuring its relevance and
effectiveness in the long term.

Overall, the goal of this system software is to empower users with a robust,
customizable, and accessible platform that enhances their ability to access
information and manage their needs effectively, irrespective of their location or
technological environment.
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 crossed their expiry
date.

Over the past decade, supermarkets have continually refined and improved their
billing systems to meet the evolving needs of both sellers and customers. These
systems are not merely transactional; they serve as comprehensive tools for
managing sales, inventory, and customer relationships.

At their core, these billing systems efficiently calculate bills, generate accurate
receipts, and maintain a detailed database of transactions. They are adept at
handling a high volume of transactions swiftly and accurately, ensuring
seamless checkout experiences for customers.

In addition to their traditional functions, modern billing systems have evolved to


incorporate advanced features that enhance customer satisfaction and loyalty.
One such feature is the ability to maintain customer relationships by tracking
purchase history and preferences. This allows supermarkets to offer
personalized promotions, discounts, or loyalty rewards to valued customers,
fostering long-term relationships and repeat business.

Moreover, these systems go beyond simple billing and inventory management


by providing insights into sales performance and profitability. They analyze
sales data to identify trends, determine which products are driving revenue, and
highlight areas for improvement. By assessing profit margins on individual
products, supermarkets can make informed decisions about pricing, promotions,
and inventory stocking.

Another crucial aspect of these billing systems is their ability to monitor


inventory in real-time and proactively manage stock levels. They can generate
alerts for items nearing expiration dates, helping to minimize waste and
maximize profitability. Additionally, they can generate automated reports
indicating which items are in high demand and need replenishment,
streamlining the inventory management process.

Overall, these billing systems serve as indispensable tools for supermarkets,


facilitating efficient operations, optimizing customer relationships, and driving
profitability. Through continuous innovation and adaptation to changing market
dynamics, they remain vital components of modern retail operations.
1.5 Proposed System:
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 data may 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 computer’s
secondary memories like hard disk, etc. it can be easily received 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.

The existing system's reliance on manual processes presents significant


challenges in terms of data retrieval, management, and accuracy. Handling
vast amounts of information stored in case files manually not only
consumes considerable time but also increases the risk of data loss or
damage. Retrieving specific data from these files can be arduous and prone
to errors, leading to inconsistencies and inefficiencies in decision-making
processes.

In contrast, the proposed system offers a transformative solution by


leveraging technology to streamline data management and improve overall
efficiency. With an intuitive user interface and automated processes, the
proposed system ensures ease of operation, allowing users to swiftly access
and manipulate data as needed. By storing data in secure computer systems,
such as hard disks, the proposed system eliminates the risk of data loss or
destruction associated with manual filing systems.

Speed and accuracy are paramount advantages of the proposed system,


enabling prompt retrieval and processing of data without compromising on
precision. By centralizing data storage and implementing robust data
management protocols, the proposed system minimizes redundancy and
ensures data consistency across all operations.

Moreover, the proposed system addresses the security concerns associated


with manual systems by implementing stringent access controls and
encryption measures to safeguard sensitive information. This not only
protects data integrity but also instills confidence in users regarding the
confidentiality and reliability of the system.

The proposed system represents a significant improvement over the existing


manual system, offering enhanced efficiency, accuracy, and security in data
management. By mitigating the drawbacks of the current system and
harnessing the power of technology, the proposed system empowers
organizations to optimize their operations and make informed decisions
based on reliable data.
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
1.7Programs and S/w used:

1.7.1 INTRODUCTION TO J2EE:

J2EE, or Java 2 Platform, Enterprise Edition, is a robust Java-based platform


primarily tailored for large-scale enterprise computing environments. Originally
known as J2EE, subsequent versions dropped the "2" and became simply Java
EE. Its core objective is to streamline application development within a tiered
architecture, particularly in thin-client environments where resources are
distributed across multiple layers.

One of the fundamental goals of J2EE is to simplify the complexities associated


with enterprise-level software development. It achieves this by introducing
standardized, reusable modular components and by automating various aspects
of programming tasks. This approach significantly reduces the need for
developers to write repetitive code and minimizes the requirement for extensive
programmer training.

By adopting J2EE, enterprises can benefit from several key advantages:

1. Standardization: J2EE provides a set of standardized specifications and


APIs (Application Programming Interfaces) that facilitate interoperability and
consistency across different components and applications. This standardization
fosters compatibility and makes it easier for developers to integrate various
software modules seamlessly.

2. Modularity: J2EE promotes a modular architecture, allowing developers to


build applications as a collection of reusable components. These components,
such as Enterprise JavaBeans (EJBs), servlets, and JavaServer Pages (JSPs), can
be assembled and configured to meet specific business requirements. This
modular approach enhances code maintainability, scalability, and reusability.

3. Automatic Management of Complexity: J2EE abstracts away many low-


level complexities associated with enterprise application development, such as
transaction management, security, and resource pooling. By delegating these
tasks to the platform, developers can focus more on business logic and higher-
level functionalities, thereby accelerating the development process and reducing
the risk of errors.

4. Scalability and Reliability: J2EE architectures are designed to support the


scalability and reliability requirements of large enterprises. They can seamlessly
scale to accommodate increasing workloads and user demands while ensuring
high availability and fault tolerance. This scalability is particularly crucial for
mission-critical applications that need to handle a significant volume of
concurrent transactions.

5. Interoperability and Integration: J2EE facilitates seamless integration with


existing enterprise systems and technologies through standardized protocols and
APIs. This interoperability enables enterprises to leverage their existing
investments in infrastructure and software while adopting new technologies and
architectures.

Overall, J2EE (or Java EE) empowers enterprises to build robust, scalable, and
maintainable applications in a cost-effective manner. By providing a
comprehensive set of tools, frameworks, and standards, J2EE simplifies the
complexities of enterprise software development and enables organizations to
focus on delivering value to their customers and stakeholders.
1.7.2 INTRODUCTION TO ECLIPSE JUNO:

Eclipse Juno had its roots in a collaboration between IBM Canada and Object
Technology International (OTI). OTI, renowned for its Smalltalk-based Visual
Age IDE series, recognized the need for a modern, Java-based IDE to succeed
its existing offerings. Leveraging their expertise in IDE development, OTI
embarked on the creation of Eclipse as a Java-based replacement.

Eclipse's journey from its inception to becoming a leading open-source software


project involved several key steps:

1. IBM Canada Project: Eclipse's origins trace back to an internal project at


IBM Canada aimed at developing a new generation of development tools.
Recognizing the potential of this project, IBM Canada provided support and
resources for its development.

2. OTI's Involvement: OTI, having a rich history in IDE development with its
Visual Age products, played a pivotal role in architecting and building Eclipse
as a Java-based IDE. Drawing on their experience and expertise, OTI engineers
contributed significantly to the early development stages of Eclipse.

3. Formation of a Consortium: As Eclipse gained traction and momentum, it


became evident that its success would depend on broader community
involvement and support. To facilitate this, a consortium was formed, bringing
together various stakeholders interested in advancing Eclipse as an open-source
software project.
4. Open Governance Model: Eclipse embraced an open governance model,
empowering contributors and stakeholders to actively participate in its
development and decision-making processes. The formation of a board of
stewards, representing diverse organizations and interests, ensured that Eclipse's
development remained transparent and community-driven.

5. Foundation Establishment: To provide a formal structure for overseeing


Eclipse's development and governance, the Eclipse Foundation was established.
This independent, nonprofit organization played a crucial role in fostering
collaboration, managing intellectual property, and facilitating ecosystem growth
around Eclipse.

6. Continued Evolution: Over the years, Eclipse has evolved into a


comprehensive ecosystem encompassing not only the original IDE but also a
wide range of projects and initiatives spanning various domains, including tools
for software modeling, testing, and collaboration.

Overall, Eclipse's journey from its origins as a project between IBM Canada and
OTI to its status as a thriving open-source community project underscores the
power of collaboration and open governance in driving innovation in software
development tools.

1.7.3 INTRODUCTION TO JSP:


JSP, or Java Server Pages, indeed stands as an essential technology in
web development, particularly within the Java ecosystem. It was introduced by
Sun Microsystems as a response to Microsoft's ASP (Active Server Pages),
offering a similar server-side scripting approach but leveraging Java instead of
Visual Basic.
The core idea behind JSP is to enable developers to create dynamic web
pages that can interact with databases and perform various server-side tasks.
Unlike static HTML pages, which are fixed and unchanging, JSP pages contain
dynamic content that can be generated on-the-fly based on user input, database
queries, or other server-side logic.

When a client requests a JSP page from a server, the server processes the
JSP code embedded within the page and generates HTML content dynamically.
This process involves compiling the JSP code into Java servlets, which are then
executed by the server to produce the final HTML output. This compilation
happens on the server-side, ensuring that the client receives only standard
HTML, which is then rendered by the browser.

One of the significant advantages of using JSP is its seamless integration


with Java code. Developers can embed Java code directly within the HTML
markup of JSP pages, allowing them to leverage the full power of the Java
platform for implementing complex logic, interacting with databases, and
performing other server-side tasks.

However, it's important to note that while JSP allows for the integration
of Java code within HTML, best practices recommend separating concerns by
keeping business logic separate from presentation logic. This can be achieved
by using JSP in conjunction with JavaBeans or other MVC (Model-View-
Controller) frameworks, which promote a more modular and maintainable code
structure.

In contrast to JSP, JavaScript is a client-side scripting language primarily


executed by the web browser. While JavaScript can enhance the interactivity
and responsiveness of web pages, it operates independently of the server and is
typically used for tasks such as form validation, DOM manipulation, and
handling user interactions.

In summary, JSP is a powerful technology for building dynamic web


applications that leverage Java for server-side processing. By combining Java
code with HTML markup, JSP enables developers to create interactive and data-
driven web pages that can respond dynamically to user input and database
queries, all while ensuring compatibility with a wide range of web browsers.

1.7.4 INTRODUCTION TO CSS:


CSS, or Cascading Style Sheets, indeed plays a crucial role in web
development by defining the presentation and layout of HTML/JSP elements. It
provides a way to separate the visual style of a web page from its underlying
content, offering significant benefits in terms of flexibility, maintainability, and
efficiency.

One of the fundamental principles of CSS is its ability to describe how


HTML/JSP elements should be displayed. This includes specifying attributes
such as color, font, size, spacing, and positioning. By using CSS, developers can
control the appearance of elements across multiple pages within a website,
ensuring consistency in design and user experience.

By separating document layout from document content, CSS greatly


enhances the flexibility of HTML/JSP. Developers can create reusable style
definitions that can be applied to multiple elements throughout a website,
reducing redundancy and simplifying maintenance. This separation of concerns
also makes it easier to update the visual style of a website without having to
modify each individual HTML/JSP file.
Storing CSS definitions in external files further streamlines the
development process. By maintaining a single CSS file that contains all style
rules for a website, developers can make global changes to the appearance and
layout of every page by editing just one file. This approach saves a significant
amount of time and effort, especially for large websites with many pages.

Imagine the scenario of needing to change the font or color scheme across
an entire website. Without CSS, this task would involve manually editing each
HTML/JSP file, which is not only time-consuming but also error-prone.
However, with CSS, developers can simply update the relevant style definitions
in the external CSS file, and the changes will be automatically applied to every
page.

Overall, CSS revolutionizes web development by providing a powerful


mechanism for controlling the visual presentation of HTML/JSP content. By
separating style from structure, CSS enables developers to create more
maintainable, flexible, and efficient websites, ultimately enhancing the user
experience and reducing development time and effort.

1.7.5 INTRODUCTION TO JAVASCRIPT:


JavaScript is indeed a fundamental scripting language in web
development, empowering developers to create dynamic and interactive
experiences for users across billions of web pages. It serves a multitude of
purposes, including adding functionality, validating forms, facilitating
communication with servers, and dynamically altering page content, among
others.

One of the key aspects of JavaScript is its versatility and ease of learning.
With its intuitive syntax and extensive documentation, JavaScript is accessible
to developers of all skill levels. Whether it's a beginner experimenting with
simple scripts or an experienced developer building complex web applications,
JavaScript provides a flexible and powerful platform for implementing a wide
range of functionalities.

Originally implemented as part of web browsers, JavaScript enables


client-side scripting, allowing scripts to run directly within the user's browser
environment. This client-side execution enables JavaScript to interact with
users, control browser behavior, and manipulate page content dynamically
without the need for server-side processing.

JavaScript's capabilities are formalized within the ECMAScript language


standard, which defines the syntax, semantics, and behavior of the language.
This standardization ensures consistency and interoperability across different
browsers and environments, allowing developers to write code that works
reliably across various platforms.

One of the key advantages of JavaScript is its ability to communicate


asynchronously with servers, typically through techniques such as AJAX
(Asynchronous JavaScript and XML). This enables web applications to fetch
data from servers and update page content dynamically without requiring a full
page reload, resulting in a smoother and more responsive user experience.

In addition to its role in client-side scripting, JavaScript is also


increasingly used on the server-side, thanks to frameworks like Node.js. This
allows developers to use JavaScript for building scalable and efficient server-
side applications, leveraging the same language and ecosystem across both
client and server environments.
Overall, JavaScript's versatility, ease of learning, and broad adoption
makes it an indispensable tool in modern web development. Whether it's
enhancing user interfaces, implementing business logic, or building full-fledged
web applications, JavaScript continues to play a central role in shaping the
interactive experiences we encounter on the web.

1.7.6 INTRODUCTION TO SQL:

SQL, or Structured Query Language, is indeed a powerful language designed


for managing data in relational database management systems (RDBMS). It is
based on relational algebra and provides a standardized syntax for performing
various operations on relational databases.

One of the key characteristics of SQL is its declarative nature, which means that
developers specify what they want to achieve (e.g., retrieve data, insert records,
update values) without needing to specify how to accomplish it. This abstraction
allows users to focus on the desired outcome rather than the implementation
details, making SQL a user-friendly language for interacting with databases.

SQL's scope encompasses a wide range of operations necessary for managing


relational databases effectively. These operations include:

1. Data Insertion: SQL allows users to insert new records into database tables,
specifying the values for each column of the table.

2. Querying: SQL provides powerful querying capabilities for retrieving data


from one or more tables based on specified criteria. Queries can include
filtering, sorting, grouping, and joining multiple tables to extract the desired
information.

3. Updating: SQL enables users to modify existing records in database tables,


allowing them to update specific values or entire rows based on specified
conditions.
4. Deletion: SQL supports the deletion of records from database tables, either
individually or in bulk, based on specified criteria.

5. Schema Creation and Modification: SQL allows users to define the


structure of the database, including tables, columns, constraints, indexes, and
relationships. It also provides mechanisms for modifying the schema as needed,
such as adding or dropping tables, columns, or constraints.

6. Data Access Control: SQL includes features for controlling access to


database objects and data, such as granting or revoking privileges to users or
roles, ensuring data security and integrity.

SQL is the de facto standard language for interacting with relational databases
and is widely supported by various database management systems, including
Oracle, MySQL, PostgreSQL, Microsoft SQL Server, and others. Its widespread
adoption and standardized syntax make it a universal tool for database
developers, administrators, and analysts, enabling seamless data management
and manipulation across different platforms and environments.

Overall, SQL's simplicity, versatility, and widespread adoption make it an


indispensable language for managing data in relational databases, playing a
central role in the storage, retrieval, and manipulation of structured data in
modern information systems.
REQUIREMENTS
AND LITERATURE SURVEY
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
ANALYSIS AND DESIGN
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 system characteristic 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.

3.2 DESIGN:
INTRODUCTION TO DESIGN PHASES:
Software design is actually a multi-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 details
necessary for implementing the system recommended in the feasibility 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.
3.3 ER DIAGRAMS OR DATAFLOW DIAGRAM

1. HOME PAGE

Customerdetails Bank account Item details

Product details HOME PAGE Material arrival

Purchase order Billing logout


2. CUSTOMER REGISTRATION FORM
Email
Fname Lname

Gender password
Customer registration

Address Phone
3. PRODUCT FORM

PRODUCT
NAME
SUPPLIER DATE
NAME

PRODUCT DETAILS

QUANTITY
PRODUCT
CODE
4. ITEM DETAILS FORM

CODE
NAME
MONTH/Y

EAR

CLOSING PRICE
ITEM DETAILS
STOCK

MDATE
STOCK EXP DATE
5. MATERIAL ARRIVAL FORM.
BILL NO
ARR NO
P ORDER

NO

STATUS ARR DATE


MATERIAL ARRIVAL

BILL DATE
REC SUPPLIER

VALUE
6. PURCHASE ORDER FORM

DEL NO
P ORDER
SUPPLIER
NO

PO NO STATUS
PURCHASE ORDER

PURC
DEL MODE PURC
ITEM DATE
7. BILLING FORM

CUSTOMER IDNO
COUNTER NO TOTAL ITEMS

BILLING BILL AMOUNT

AMOUNT PAID
NET BILL DISCOUNT
8. BANK ACCOUNT FORM

C-ID NO

CHEQUE CHEQUE
DATE NO

BANK ACCOUNT

AMOUNT
BANK
NAME
IMPLEMENTATION
DETAILS
4.1 CODING

1 Login form

Jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


<title>Insert title here</title>
<%@include file="head.jsp"%>
</head>
<body bgcolor="white" text="SILVER" background="images\Blue-Abstract-
Vector-Background.jpg">

<form name="login" action="LoginServlet" method="post">


<CENTER>
<table>
<B>
<tr>
<td>User Name</td>
<td><input type="text" name="uname"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="pass"></td>
</tr>
<tr>
<td><input type="submit" value="Login"></td>
<td><input type="reset" value="Reset"></td>
</tr>
<tr><td>New user</td><td><a href="register.jsp">Sign </a>
</table>
</CENTER>
</B>
</form>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("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");

</script>
</html>
SERVLET

package com.megainfo.servlet;

import java.io.IOException;
import java.util.ArrayList;

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.LoginModel;

publicclass LoginServlet extends HttpServlet {


privatestaticfinallongserialVersionUID = 1L;

protectedvoid doPost(HttpServletRequest request, HttpServletResponse


response) throws ServletException, IOException {
String name = request.getParameter("uname");
String pass = request.getParameter("pass");
ArrayList list = newArrayList();

HttpSession session = request.getSession();

LoginModel lm = new LoginModel();


try {
list = lm.loginModel(name, pass);
if(!list.isEmpty()){
session.setAttribute("name", name);
session.setAttribute("pass", pass);
response.sendRedirect("welcome.jsp");
}
else{
response.sendRedirect("invalid.jsp");
}

} catch (Exception e) {
//
e.printStackTrace();
}

}
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<String> list = new ArrayList<String>();

public ArrayList loginModel(String name, String pass) throws


Exception {

String dbname="";

String dbpass="";

con = DBConnection.getConnection();

System.out.println("LoginMode::loginMode - Connection success...");

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<String> list = new ArrayList<String>();

LoginModel lm = new LoginModel();

list = lm.loginModel("srinivas", "123");

System.out.println(list);

}}
WELCOME FORM

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
td {
font-size: 30px;
font-family: sans-serif;
padding-left: 20px;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" href="css/mm_spa.css" type="text/css" />
<%@include file="head.jsp"%>

</head>
<CENTER></CENTER>
<b><body text="black" bgcolor="black"
background="images/abstract-blue-vector-backgrounds-wallpapers.jpg">
<script language="JavaScript">
<!--
var name=prompt("Enter Your Name, Please.","name");
var today = new Date ()
var hrs = today.getHours();
document.writeln("<b>");
document.writeln("<b>");
if (hrs <= 12)
document.write("Good Morning "+name+'!');
elseif (hrs <= 18)
document.write("Good Afternoon "+name+'!');
else
document.write("Good Evening "+name+'!'); document.writeln("<br />");
// -->
</script>
<script>

var mydate=new Date()


var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Satu
rday")
var montharray=new
Array("January","February","March","April","May","June","July","August","S
eptember","October","November","December")
document.write("<small><font color='black'
face='newtimesroman'><b>"+dayarray[day]+", "+montharray[month]+"
"+daym+", "+year+"</b></font></small>")

</script></b>

<img src="images\hudigi.jpg" height="400" width="400" align="right"


hspace="50" vspace="50">
<img src="images\Supermarket.jpg" height="400" width="400" vspace="50"
hspace="50" align="right">
</CENTER>
<br>
<br>
<br>
<table>
<tr>
<td><a href="register.jsp">Customer registration</a></td>
</tr>
<tr>
<td><a href="search_coustmer.jsp">Customer List</a></td>
</tr>
<tr>
<td><a href="edit_coustmer.jsp">Edit Customer</a></td>
</tr>
<tr>
<td><a href="PRODUCT.jsp">Product</a></td>
</tr>
<tr>
<td><a href="stock.jsp">Item Details</a></td>
</tr>

<tr>
<td><a href="materival arrival.jsp">MaterialArrival</a></td>
</tr>
<tr>
<td><a href="purchaseorder.jsp">PurchaseOrder</a></td>
</tr>
<tr>
<td><a href="billingform.jsp">Billing</a></td>
</tr>
<tr>
<td><a href="BANK AC FORM.jsp">BANK A/C</a></td>
</tr>

<tr>
<td><a href="logout.jsp">LogOut</a></td>
</tr>
</table>
</body>
</html>
PURCHASEORDERFORM
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" media="all"
href="css/jsDatePick_ltr.min.css" />
<script type="text/javascript" src="datepicker/datetimepicker.js"></script>
<style type="text/css">
#tst {
table-layout: auto;
display: table;
}
td,h1{
color:white;}
</style>

</head>
<body bgcolor="black" text="silver" background="images\Blue-Ground.jpg">
<CENTER>
<h1>PURCHASE ORDER</h1>
</CENTER>
<hr size="3" color="red">
<form name="mt" action="PURCHASESERVLET" method="POST">
<b>
<center>
<TABLE id="tst" border=1>
<TR>
<TD>PURCHASE ORDER NO:</TD>
<TD><SELECT NAME="PONO">
<option>smb23
<option>smb24
<option>smb25
</SELECT></TD>
</TR>
<TR>
<TD>DELIVERY NO:</TD>
<TD><SELECT NAME="DELNO"><option>smb12
<option>smb13
<option>smb14</SELECT></TD
</TR>
<TR>
<TD>SUPPILER:</TD>
<TD><SELECT NAME="SUPP">
<option>RAMESH
<option>SRINIVAS
<option>SANGAMESH
</SELECT></TD>
</TR>
<TR>
<TD>STATUS:</TD>
<TD><SELECT NAME="STATUS"><option>RECIEVED

<option>REJECTED</SELECT></TD>
</TR>
<TR>
<TD>PURCHASE DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="PODATE" SIZE="20"id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a></TD>
</TR>
<TR>
<TD>PURCHASE ITEM:</TD>
<TD><SELECT NAME="PURITEM">
<option>VEGETABLES
<option>FRUIT
<option>SPORTSITEM
<option>OTHER
</SELECT></TD>
</TR>
<TR>
<TD>DELIVERY MODE:</TD>
<TD><SELECT NAME="DELMODE">
<option>TEMPO
</SELECT></TD>
</TR>
<TR>
<TD>PO VALUE:</TD>
<TD><INPUT TYPE="TEXT" NAME="POVALUE" SIZE="20"></TD>
</TR>
</TABLE>
<BR><INPUT TYPE="SUBMIT" value="SUMBIT"><INPUT TYPE="RESET"
value="CLEAR">
</center
</b>
</form>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("mt");
frmVal.addValidation("PODATE","req","Please enter Purchase date");
frmVal.addValidation("PODATE","maxlen=5","Max length for Customer ID is
5");

frmVal.addValidation("POVALUE","req","Please enter po value");


frmVal.addValidation("POVALUE","maxlen=15","Max length for Check-in-
date is 15");
</script>
</html>
MATERIVAL ARRIVALFORM

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script language="javascript" type="text/javascript"
src="datepicker/datetimepicker.js">
</script>
<style type="text/css">
#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;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
#tsttr.alttd
{
color:#000000;
background-color:#EAF2D3;
}

</style>
</head>
<body bgcolor="black" text="black"
background="images\pink-wallpaper-13.jpg">
<CENTER>
<h1>MATERIAL ARRIVAL</h1>
</CENTER>
<hr size="3" color="red">
<form name ="mt" action="Materivalarrivalservlet" method="POST">
<b>
<center>
<TABLE id="tst" border=1>
<TR>
<TD>ARRIVAL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRNO" SIZE="25"></TD>
</TR>
<TR>
<TD>BILL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLNO" SIZE="25"></TD>
</TR>
<TR>
<TD>PURCHASE ORDER NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="PONO" SIZE="25"></TD>
</TR>
<TR>
<TD>ARRIVAL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRDATE" SIZE="25" id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>BILL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLDATE" SIZE="25" id="bd"><a
href="javascript:NewCal('bd','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>SUPPILER:</TD>
<TD><INPUT TYPE="TEXT" NAME="SUPP" SIZE="25"></TD>
</TR>
<TR>
<TD>RECIEPT VALUE:</TD>
<TD><INPUT TYPE="TEXT" NAME="RECVAL" SIZE="25"></TD>
</TR>
<TR>
<TD>STATUS:</TD>
<TD><SELECT NAME="STATUS">
<option>Delivered
<option>Rejected
</SELECT></TD>

</TR>
</TABLE>
<BR><INPUT TYPE="SUBMIT" value="SUMBIT"><INPUT TYPE="RESET"
value="CLEAR">
</center>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("mt");
frmVal.addValidation("ARRNO","req","Please enter arrival no");
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 of
members travelling is 3");
frmVal.addValidation("BILLDATE","req","Please enter bill date");
frmVal.addValidation("BILLDATE","maxlen=15","Max length for Total
amount charged 15");

frmVal.addValidation("SUPP","req","Please enter supplier");


frmVal.addValidation("SUPP","maxlen=15","Max length for Total amount
charged 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 amount
charged 15");
</script>
</html>
PRODUCT FORM:

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>PRODUCT FROM</title>
<script language="javascript" type="text/javascript"
src="datepicker/datetimepicker.js">
</script>
<style type="text/css">
#tst{table-layout: auto;
display: table;
}
</style>
</head>
<body text=silver bgColor="black" background="images\Blue-Ground.jpg">
<CENTER>
<H1>PRODUCT FORM </H1></CENTER>
<HR color=red SIZE=3>

<FORM name ="pro" action="Productservlet" method=get><B>


<CENTER>
<TABLE id="tst" border=1>
<BODY>
<TR>
<TD>PRODUCT NAME:</TD>
<TD><INPUT type=text name=PDNO></TD>
</TR>
<TR>
<TD>DATE:</TD>
<TD><INPUT type=text name=DATE id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a></TD>
</TR>
<TR>
<TD>SUPPILER NAME:</TD>
<TD><INPUT type=text name=SUPPNAME></TD>
</TR>
<TR>
<TD>PRODUCT CODE:</TD>
<TD><INPUT type=text name=PROCD></TD>
</TR>
<TR>
<TD>QUANTITY:</TD>
<TD><INPUT type=text name=QUAN></TD>
</TR>
</TABLE>
<INPUT type=submit value=SUMBIT><INPUT type=reset value=CLEAR>
</CENTER>
</B>
</FORM>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("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 is
15");

frmVal.addValidation("SUPPNAME","req","Please enter the supplier name");


frmVal.addValidation("SUPPNAME","maxlen=15","Max length Check-out-
date is 15");

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");
</script>
</HTML>
MATERIVAL ARRIVALFORM 2

JSP:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"


pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script language="javascript" type="text/javascript"
src="datepicker/datetimepicker.js">
</script>
<style type="text/css">
#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;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
#tsttr.alttd
{
color:#000000;
background-color:#EAF2D3;
}

</style>
</head>
<body bgcolor="black" text="black"
background="images\pink-wallpaper-13.jpg">
<CENTER>
<h1>MATERIAL ARRIVAL</h1>
</CENTER>
<hr size="3" color="red">
<form name ="mt" action="Materivalarrivalservlet" method="POST">
<b>
<center>
<TABLE id="tst" border=1>
<TR>
<TD>ARRIVAL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRNO" SIZE="25"></TD>
</TR>
<TR>
<TD>BILL NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLNO" SIZE="25"></TD>
</TR>
<TR>
<TD>PURCHASE ORDER NO:</TD>
<TD><INPUT TYPE="TEXT" NAME="PONO" SIZE="25"></TD>
</TR>
<TR>
<TD>ARRIVAL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="ARRDATE" SIZE="25" id="ad"><a
href="javascript:NewCal('ad','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>BILL DATE:</TD>
<TD><INPUT TYPE="TEXT" NAME="BILLDATE" SIZE="25" id="bd"><a
href="javascript:NewCal('bd','ddmmyyyy')"><img src="images/cal.gif"
width="16" height="16" border="0" alt="Pick a date"></a>
</TD>
</TR>
<TR>
<TD>SUPPILER:</TD>
<TD><INPUT TYPE="TEXT" NAME="SUPP" SIZE="25"></TD>
</TR>
<TR>
<TD>RECIEPT VALUE:</TD>
<TD><INPUT TYPE="TEXT" NAME="RECVAL" SIZE="25"></TD>
</TR>
<TR>
<TD>STATUS:</TD>
<TD><SELECT NAME="STATUS">
<option>Delivered
<option>Rejected
</SELECT></TD>

</TR>
</TABLE>
<BR><INPUT TYPE="SUBMIT" value="SUMBIT"><INPUT TYPE="RESET"
value="CLEAR">
</center>
</body>
<script language="JavaScript" src="js/gen_validatorv2.js"
type="text/javascript">
</script>
<script language="JavaScript" type="text/javascript">
var frmVal = new Validator("mt");
frmVal.addValidation("ARRNO","req","Please enter arrival no");
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 of
members travelling is 3");

frmVal.addValidation("BILLDATE","req","Please enter bill date");


frmVal.addValidation("BILLDATE","maxlen=15","Max length for Total
amount charged 15");

frmVal.addValidation("SUPP","req","Please enter supplier");


frmVal.addValidation("SUPP","maxlen=15","Max length for Total amount
charged 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 amount
charged 15");
</script>
</html>

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 {
response.sendRedirect("register_failed.jsp");
}
} catch (Exception e) {
//
e.printStackTrace();
}
}
}

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,String
DELMODE,String POVALUE)
throws Exception {
String query = "insert into `purchasemodel`
(`PONO`,`DELNO`,`SUPP`,`STATUS`,`PODATE`,`PURITEM`,`DELMODE`
,`POVALUE`) values
('"+PONO+"','"+DELNO+"','"+SUPP+"','"+STATUS+"','"+PODATE+"','"+PU
RITEM+"','"+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+" ");
i = smt.executeUpdate(query);
System.out.println("LoginMode::loginMode - Query exectued..." + i);
if (i == 1) {
flag = true;
} else {
flag = false;
}
return flag;
}

REGISTRATION SUCCESS

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body bgcolor="orange"
background="images\Light_green_Vector_flowers_abstract_backgrounds.jpg"
><br>
<img src="images\smileyface.jpg" align="right" height="200" width="200">
<h4><B><I>Thanks you have registered successfully!</I></B></h4>
<A HREF="welcome.jsp"> BACK</A>
</body>
</html>

INVALID USER

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Sorry Invalid user!
<a href="login.jsp">Try again</a>
</body>
</html>

LOGOUT

JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

</head>
<body><br><br><br>
<h4>Thanks, You have successfully logged out!!</h4>
<%
session.invalidate();
%>
</body>
</html>

NO_RECORDS

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title><style type="text/css">

</head>
<body bgcolor="orange"
background="images\Light_green_Vector_flowers_abstract_backgrounds.jpg"
>
<h5>Sorry No records!!</h5>
<a href="welcome.jsp">Go Back</a>
</body>
</html>

UPDATE CUSTOMER

JSP:
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
ArrayList list = newArrayList();
list = (ArrayList) session.getAttribute("empdetails");
System.out.println("List in JSP " + list);
%>
<form action="UpdatecoustmerServlet">
<table border="" width="800">
<tr>
<td>Employee No</td>
<td>First Name</td>
<td>Last Name</td>
<td>Email</td>
<td>Phone</td>
<td>Gender</td>
<td>Address</td>
</tr>
<%
for (int i = 0; i < list.size(); i = i + 7) {
%>
<tr>
<td><%=list.get(i)%></td>
<td><input type="text" name="fname" value="<%=list.get(i + 1)%>">
</td>
<td><input type="text" name="lname" value="<%=list.get(i + 2)%>">
</td>
<td><input type="text" name="email" value="<%=list.get(i + 3)%>">
</td>
<td><input type="text" name="phone" value="<%=list.get(i + 4)%>">
</td>
<td><input type="text" name="gender" value="<%=list.get(i + 5)%>">
</td>
<td><input type="text" name="address" value="<%=list.get(i + 6)%>">
</td>
</tr>
<%
}
%>
<tr>
<td><input type="hidden" name="empnumber"
value="<%=list.get(0)%>"></td>
<td colspan="4"><input type="submit" value="Update"></td>
</tr>
</table>
</form>
</body>
</html>

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()
*/
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 {

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();
}
}

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, String
fname,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+"' WHERE
emp_no='"+coustmernumber+"';";
con = DBConnection.getConnection();
System.out.println("RegisterModel::loginMode - Connection success...");
smt = con.createStatement();
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;
}

SERVLET 2
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()
*/
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 {

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();
}
}

MODEL 2
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, String
fname,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+"' WHERE
emp_no='"+coustmernumber+"';";
con = DBConnection.getConnection();
System.out.println("RegisterModel::loginMode - Connection success...");
smt = con.createStatement();
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;
}
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 other
software 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.
5 SCREEN SHOTS
.
1. EMPLOYEE REGISTER FORM :
2.REGISTER SUCCESSFUL FORM.
3. LOGIN FORM.
4. HOME FORM
5. Customer Registration
6. UPDATE CUSTOMER FORM.
7. PRODUCT FORM
8. ITEM DETAILS FORM
9. MATERIAL
ARRIVAL
10.PURCHASE ORDER FORM
11. BILLING FORM
12. BANK ACCOUNT
13. details saved form

14. logout form


5.2 Database Tables:

1. BANKTABLE

2. BILLTABLE
3. CUSTOMER TABLE

4. EMPLOYEETABLE
5. ITEM TABLE

6.MATERIAL TABLE
7.PRODUCT TABLE

8.PURCHASE TABLE
CONCLUSION
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;

Some of the important features provided in this project include:

1. Scalability and Performance Optimization: The project employs


J2EE technologies to ensure scalability and performance optimization,
allowing the SMB to handle increasing workloads efficiently as the
business grows.

2. Data Integrity and Reliability: With the use of SQL for database
management, the project ensures data integrity and reliability, crucial for
maintaining accurate records and facilitating informed decision-making
within the SMB.

3. Integration Capabilities: Leveraging J2EE's integration capabilities,


the project facilitates seamless integration with other systems and
services, enabling the SMB to streamline business processes and enhance
productivity.

4. Security Measures: The project implements robust security measures


inherent in J2EE, safeguarding sensitive business data and protecting
against unauthorized access or malicious attacks, thus ensuring
compliance with industry regulations and standards.

5. Modular Design and Maintainability: Through a modular design


approach, the project promotes maintainability by allowing components
to be developed, tested, and updated independently, minimizing
downtime and reducing the risk of system failures.

6. User-Friendly Interfaces: Utilizing JSP technology, the project offers


user-friendly interfaces that enhance usability and accessibility,
empowering SMB staff to navigate the system efficiently and perform
tasks with ease.

7. Flexible Deployment Options: With J2EE's support for various


deployment architectures, the project offers flexible deployment options,
including on-premises or cloud-based deployment, catering to the SMB's
specific needs and preferences.
8. Support for Business Logic: By incorporating EJB components, the
project encapsulates business logic in a scalable and reusable manner,
enabling the SMB to adapt to changing business requirements and
maintain a competitive edge in the market.

9. Transaction Management: The project ensures data consistency and


reliability through robust transaction management mechanisms provided
by J2EE, allowing the SMB to conduct business transactions with
confidence and accuracy.

10. Comprehensive Testing Framework: With a comprehensive testing


framework integrated into the development process, the project ensures the
reliability and quality of the software, minimizing the occurrence of bugs and
errors in production environments.

Observing a project like a Supermarket Billing System can provide


valuable insights into the practical application of software
development principles, particularly when combined with learning
technologies like J2EE (Java 2 Platform, Enterprise Edition) and
SQL (Structured Query Language).

1. Understanding the Project Requirements:


Observing the Supermarket Billing System project would involve
understanding its requirements, functionalities, and the technology stack
used. This includes comprehending how the system handles billing,
inventory management, customer data, and reporting.

2. Analyzing the Architecture:


Examining the architecture of the Supermarket Billing System can
provide insights into how different components interact with each other.
This may include frontend interfaces for billing counters, backend servers
for processing transactions, and databases for storing product information
and customer data.
3. Learning J2EE:
J2EE is a platform-independent, Java-centric environment for
developing enterprise applications. Learning J2EE involves
understanding concepts such as Servlets, JavaServer Pages (JSP),
Enterprise JavaBeans (EJB), Java Persistence API (JPA), and Java
Message Service (JMS). These technologies are commonly used in
building scalable and robust web applications, which could be relevant to
the Supermarket Billing System project.

4. Exploring SQL:
SQL is a standard language for managing relational databases. Learning
SQL involves understanding how to create, retrieve, update, and delete
data from databases. This skill is essential for interacting with the
backend database of the Supermarket Billing System, querying product
information, customer records, and generating reports.

5. Integration with the Project:


Applying the knowledge gained from learning J2EE and SQL, one can
explore how these technologies are utilized in the Supermarket Billing
System project. This may involve examining the backend codebase to
understand how Java components interact with the database using SQL
queries or ORM (Object-Relational Mapping) frameworks like Hibernate.

6. Hands-on Practice:
Engaging in hands-on practice is crucial for solidifying understanding
and gaining practical experience. This could involve setting up a local
development environment, building simple J2EE web applications,
creating and querying databases using SQL, and perhaps even
contributing to open-source projects related to supermarket billing
systems.

7. Continuous Learning and Improvement:


Software development is a continuous learning process. As one
progresses in their understanding of J2EE, SQL, and other related
technologies, they can continually refine their skills by tackling more
complex projects, exploring advanced topics, and staying updated with
industry trends and best practices.
6.2Advantage:

• 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.3Future 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.
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 at http://en.wikipedia.org/wiki/J2EE.


2. Text book of HTML and INTERNET TECHNOLOGY for Vth sem
BCA.
3. Our J2EE certificate course guide Mr. Ramesh M Karuti.
4. SQL table codes at http://www.w3schools.com/sql/default.asp.
5. JSP codes and format available at www.softcodes.com.
6. Wikipedia a free encyclopedia for codes and softwares.

You might also like