Professional Documents
Culture Documents
com
Chapter 1
Introduction
1.1
The modern industrial world is very much advanced in technology and competition in the
world is intense. The user of a computer is provided with the HARDWARE and SOFTWARE,
the two source of the computer. Much of the software will be programs which facilities the
fast automatic management of the computer system resource.
www.freestudentprojects.com
www.freestudentprojects.com
Undergoing Major Modification: Data will be stored in the database after the development.
.
In this project Java has been used as the Front-End tool and MS Access has been used as the
back-End tool.
The following are the Scope and area covered:
It can be applied to large databases with more information.
To enables the software to work in a multi-user environment.
To enable the software to develop the profit and loss accounts of the firm.
Structure of the system:
Menu
Itemmaster
Sale
Purchase
Daily Expense
Employee Info
Reports
Stock
Purchase
Sales
Employee
Fig 1.1
1.2
lifecycle services to web applications, the NetBeans runtime container provides them to Swing
applications. Application servers understand how to compose web modules, EJB modules, and
so on, into a single web application, just as the NetBeans runtime container understands how to
compose NetBeans modules into a single Swing application.
APACHE TOMCAT is an open source software implementation of the Java Servlet and
JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are
developed under the Java Community Process. Apache Tomcat is developed in an open and
participatory environment and released under the Apache License version 2. Apache Tomcat is
intended to be a collaboration of the best-of-breed developers from around the world. We invite
you to participate in this open development project. Apache Tomcat powers numerous large2
www.freestudentprojects.com
www.freestudentprojects.com
scale, mission-critical web applications across a diverse range of industries and organizations.
Some of these users and their stories are listed on the PoweredBy wiki page.
MS ACCESS is used to create simple database solutions. Access tables support a variety of
standard field types, indices, and referential integrity. Access also includes a query interface,
forms to display and enter data, and reports for printing. The underlying Jet database, which
contains these objects, is multiuser-aware and handles record-locking and referential integrity
including cascading updates and deletes. Data is locked at the record level which is
significantly different from Excel which locks the entire spreadsheet.
1.3
programming language of the current age. Java is a simple, portable, distributed, robust, secure,
dynamic, architecture neutral, object oriented programming language.
3
www.freestudentprojects.com
www.freestudentprojects.com
Chapter 2
Software Requirement Specification
2.1 Introduction:
The Software Requirement Specification is a document that describes the external
requirement for any system. The Requirement analyst has to identify the Requirements by
taking to the clients and understanding their needs. The inputs are to be gathered from
different resources, these inputs may be inconsistent. The Requirement phase translates the
ideas in the minds of the clients into a formal document. Here the user needs are accurately
specified. Requirement must be actionable, measurable and testable related to business need or
opportunities and defined to a level of detail sufficient for system design.
Advantages of developing the SRS is as follows: An SRS establishes the basis for the agreement between the client and the developer
on what the software product will do.
2.1.1 Purpose
The mobile store management will make storing of the stock records, employee
records, purchase information, and customer information a lot easier. The supplier and sales
information in the database it will automatically generate bills when the customer buys the
4
www.freestudentprojects.com
www.freestudentprojects.com
mobile. The bill history can be retrieved promptly. And reports will be generated based on
different criteria
2.1.2 Scope
The project could be implemented in an average sized organization. An average
company will not be very keen on spending loads of money on ledgers. Whereas our project
will greatly reduce the costs which is using common and cheap office items like database and
desktop application. And also there is no requirement to store books or accounts. The data is
directly stored in the database in the hard disk of the PC.
2.1.3 Overview
This project Mobile store management system is software part of the Mobile
Billing management system; on improving this software we can easily track all the Employee
detail, sales item detail and purchase detail, stock detail ,bill detail and also we can able
generate report. The main goal of the software is build a good management tool. The Mobile
Billing management will make storing of the customer records, stock records, sales detail ,
employee information in the database it will automatically generate bills when the customer
purchase mobile. The customer purchase and item stock history can be retrieved very
promptly. And reports should be generated based on different criterias.
www.freestudentprojects.com
The different modules specified are used for the indentation purpose, to make
transactions based on different criteria. This project includes graphical user interface with
simple menus, which help the user to input, process and retrieve data with ease. This project is
designed to do the functionalities of mobile Store where in they need to keep track of Sales
log. it also describes stock record, sales record, employee information etc.
2.2.3. User Characteristics:The user of this product is supposed to be fairly educated about the usage of the
computers. He should understand how to store products and he should have knowledge about
various products so that they could be saved. A person who has no knowledge of computers
will find it difficult to understand the system. But with a little knowledge it will be very easy
to handle the project.
Admin: Admin collects and stores information about purchase, sales etc. and stores it in the
database file which can be retrieved and used when ever needed and all the validations are
performed during the entry of the data by the user thus ensuring that the user can not enter
any wrong data which would cause problem later.
User : The system allows the mobile shop user to maintain the records of employee, goods.
The user can manage the records by adding, deleting and searching for information, which are
necessary. The system provides the facility of viewing the report on the subject by the user.
2.2.4. General Constraints:2.2.4.1 Log on validation:Mobile store management system has Login Name and Password to enter into the
system. If both are valid then only User/Admin is allowed to enter into system. Login Name
and Password can also be changed.
2.4.5. Assumption
The application becomes slow when the number of simultaneous user exceeds certain limits.
The code should be free with compilation errors or system errors.
The product must have an interface which is simple enough to understand.
www.freestudentprojects.com
2.3.1.1. User Interface:JAVA and Microsoft access is used for user interface and for maintaining Database
respectively. Java is used as a front-end application and Microsoft access is used as a back-end
application.
Itemmaster
Add Item
Edit Item
Delete Item
Sale
Add Sale
Delete Sale
Purchase
Purchase Order
Employee Detail
Add Employee Detail
Daily Expense
Add Expense
Reports
Stock Report
Sale Report
Purchase Report
Employee Report
Login
Change Password
512 RAM
www.freestudentprojects.com
JDK 1.6.0
8
www.freestudentprojects.com
www.freestudentprojects.com
This is also a master entry form to enter the details of the daily expense. All the
details of the daily expense of the user can be entered in this form.This page is used for enter
the details of daily expense such as edate, , item detail, amount.
www.freestudentprojects.com
2.6
OTHER REQUIREMENTS
OTHER REQUIREMENTS ARE NONE
10
www.freestudentprojects.com
www.freestudentprojects.com
Chapter 3
System Design
3.1 Introduction:
The purpose of the Design Phase is to a solution of the problem specified in the
requirements document. This is the first step in moving from the problem domain to the
solution domain. The design of a system is perhaps the most critical factor affecting the
quality of the software; it has a major impact on the later phases is the Design Document.
This Document is similar to a blueprint or a plan for the solution and is used later during
implementation, testing and maintenance.
The goal of the design process is to produce a model of a system, which can be used
later to build that system. The produced model is called design of the system.
3.2
Overview:
The Design activity is often divided into separate phases System Design and
Detailed Design. System Design is sometimes also called Top-Level Design. This system
design aims to identify and modules that should be in the system, the specifications of these
modules, and how they interact with each other to produce the desired result. At the end of the
System Design all the major data structures, file formats, and the major modules in the system
and their specifications are decided.
3.3 Scope:
11
www.freestudentprojects.com
www.freestudentprojects.com
This Application works in Multiple PCs installed on multiple Computers but sharing
same database by which users of different department can use it sitting at different locations
simultaneously.
But in future we can make the Application where the database will be hosted in order to
manage the all departments which will be located in different places and by keeping domain of
Application as Online.
3.4
Background:
The background entity for the MSM is mainly on the paper work.
All the documents reports where prepared and maintained manually by the employers.
So primary scope of this MSM will reduce the paper work and to have system generated
bill with accurate calculations.
3.5.2 Constraints:
The constraints of this project are the system must support the runtime files of java and
www.freestudentprojects.com
Jcreator
Netbeans5.5
Jboss
3.6.2 Risks
Image processing is more difficult in core java in order to overcome.We can also
use html coding, design is not userfriendly its very rigid. Microsoft access to store the
data unlimitedly
13
www.freestudentprojects.com
www.freestudentprojects.com
Webapp Classloader(s)
directory:
WEB-INF/classes
WEB-INF/lib
|
Apps Classloader
directory:
lib/apps
default contents:
empty
\
/
Common Classloader
directory:
lib/common
default contents:
connector_util.jar
core_util.jar
etomcat.jar
jasper-runtime.jar
servlet.jar
tomcat_core.jar
|
Application Classloader
the CLASSPATH classloader
default contents:
tomcat.jar
|
JDK Extensions Classloader
directory:
jdk/jre/lib/ext
14
www.freestudentprojects.com
www.freestudentprojects.com
Handlin
g
frames
and
respons
PC
running
Tomcat
server
bill.
In expense form we can details details of daily expenses.
Finally the report form is to view stock, sales, purchase & employee
reports.
15
www.freestudentprojects.com
www.freestudentprojects.com
16
www.freestudentprojects.com
www.freestudentprojects.com
NOTATION
DESCRIPTION
Processes or transform are represented by
circles in a DFD. This shows what systems
do. Each process has one or more data inputs
and produces one or more data outputs. Each
process has a unique name which appear
inside the circle that represent the process in a
DFD.
The rectangle is used to represent an external
entity, that is a system element or another
system that produces information for
transaction by the software or receives the
information produced by the software.
An arrow represent one or data items or data
objects. A data flow shows the flow of
information from its source to its destination.
A database is a holding place for information
within the system. It is represented by a
cylindrical notation. Data stores may be longterm files or may be short-term.
17
www.freestudentprojects.com
www.freestudentprojects.com
18
www.freestudentprojects.com
www.freestudentprojects.com
19
www.freestudentprojects.com
www.freestudentprojects.com
20
www.freestudentprojects.com
www.freestudentprojects.com
21
www.freestudentprojects.com
www.freestudentprojects.com
3.9
Input:- serial no, item name, itemgroup, code no,description,date, color, qty,price.
Output: serial no, item name, itemgroup, code no,description, date, color, qty,price
3.9.1.3
Input:- serialno,sdate, cname, caddress, item group, item name, qty, price, total
amount
22
www.freestudentprojects.com
www.freestudentprojects.com
3.9.2.2
Output :- All the entered data will be stored in respective database and will be
displayed in the grid.
3.9.2.3
Chapter 4
Database Design
23
www.freestudentprojects.com
www.freestudentprojects.com
4.1General Information
A database is a system intended to organize, store, and retrieve large amounts of data
easily. It consists of an organized collection of data for one or more uses, typically in
digital form.
Database design is the process of producing a detailed data model of a database. This
logical data model contains all the needed logical and physical design choices and physical
storage parameters needed to generate a design in a Data Definition Language, which can then
be used to create a database. A fully attributed data model contains detailed attributes for each
entity.
4.2
Purpose
Database is a simply collection of information or data. The first step is designing a
database application is to understand what the data is to be stored in the database, what
application must be built on it and what operators must frequent and subject to perform
requirements. The term database design can be used to describe many different parts of the
desighn of an overall database system.It also be used to apply to the overall process of
designing ,not just the data structure,but also the forms and queries used as part of the over all
database applicationwith the database management system.
4.3
Scope
This application uses MS access database to store and retrieve information. All the
fields in the table are designed according to the values required in the project. If we have good
database then easy to locate the data or information in less time. Using database, admin can
update the data and user can access the information. It contain a short description of the data
using in the application.
4.4
System Overview
www.freestudentprojects.com
www.freestudentprojects.com
A short definition of an RDBMS may be a DBMS in which data is stored in the form of
tables and the relationship among the data is also stored in the form of tables.
4.6.2 Coordination
Database should be secure, Security is the degree of protection against danger, damage,
loss, and criminal activity. Security as a form of protection are structures and processes that
provide or improve security as a condition.
www.freestudentprojects.com
Data security is the protection of the database from unauthorized users. Only the authorized
persons are allowed to access the database. Most of the users are allowed to access a part of
database i.e., the data that is related to them or related to their department. The DBA or head
of department can access all the data in the database. Some users may be permitted only to
retrieve data, whereas others are allowed to retrieve as well as to update data. The database
access is controlled by the DBA. He creates the-accounts of users and gives rights to access
the database. Typically, users or group of users are given username protected by password.
Most of the DBMSs provide the security sub-system, which the DBA uses to create
account of users and to specify account restrictions. The user enters his/her account number (or
user name) and password to access the data from database.
www.freestudentprojects.com
Fields:EmpID,Name,Age,Address,Sex,Designation,DOB,Experience,DOJ,Salary
The Expense table stores the information of daily expense.
Fields:EDate,Detail,Amount
The Dealer table contains names of dealers.
Fields:Dealername
Password
Itemmaster Table
Serial_N
ModelNam
Companynam
CodeN
Descriptio
ItemDat
Colo
Qt
Price
Purchase Table
Serial_n
Coden
pDat
Dealer
Itemnam
Itemgrou
Descriptio
Pric
Qt
TotalAmount
Name
Sale Table
SDate
Serial_no
Cname
Caddress
Itemname
Itemgrou
Price
Qty
TotalAmount
Expense Table
EDate
Detail
Amount
Bill Table
SDate
maxno
billno
Cname
Caddress Itemgrou
p
Itemnam
e
Price
Qty
TotalAmount
www.freestudentprojects.com
empi
Name Ag
Addres
Se
Designatio
DOB
Experienc
DO
Salar
Dealer table
Dealername
4.7.5 Description
The database used in our application namely
Login Table
Bill Table
Employee info Table
Expense Table
ItemMaster Table
Purchase Table
Sale Table
Dealer table
The Itemmaster table stores the details of items like mobile phones and its accessories.
Fields:Serial_No,itemname,itemgroup,Codeno,Description,Itemdate,color, price,qty.
Primary key: Serial_No
The Purchase Table stores the information about purchase details.
Fields:Serial_No,pdate,dealername,itemname,itemgroup,codeno,description,price,qtytota
lamount.
Primary key: codeno
The Sale Table stores the information about sales details.
Fields:Serial_ no,sdate,cname,caddress,itemname,itemgroup,Price,Qty,TotalAmount.
Primary key :Serial_ no
The Bill Table stores the bill information
Fields:maxno,billno,sdate,cname,caddress,itemname,itemgroup,Price,Qty,
TotalAmount
Primary key:Bill_no
The Employee info Table stores the employee information.
Fields:EmpID,Name,Age,Address,Sex,Designation,DOB,Experience,DOJ,Salary.
Primary key:EmpID
The Expense table stores the information of daily expense.
Fields:EDate,Detail,Amount
The Dealer table contains names of dealers.
Fields:Dealername
28
www.freestudentprojects.com
www.freestudentprojects.com
Login
4.7.6 Table
Username
Password
Expense
Edate
Details
Amount
Purchase Employeeinfo
Itemmaster
Serial_no Name
Serial_nopDate
Address
Codeno Dealername Age
ItemnameItemname Empid
ItemgroupItemgroup Sex
Description
Codeno
Designation
www.freestudentprojects.com
Itemdate
Description DOB
color
Qty
Experience
Qty
Price
DOJ
Price
Totalamount Salary
Physical Design
29
www.freestudentprojects.com
Dealer
Dealername
Sale
Serial_no
sDate
Cname
Caddress
Itemgroup
Itemname
Price
Qty
Totalamount
Bill
maxno
sDate
billno
Cname
Caddress
Itemgroup
Itemname
Price
Qty
Totalamount
4.8 ER Diagram
An Entity Relation(ER) Diagram is a specialized graphics that illustrates the
interrelationship between entities in a database. ER diagrams often use symbols to represent 3
different types of information. Boxes are commonly used to represent entities. Diamonds are
normally used to represent relationships and ovals are used to represent attributes.
30
www.freestudentprojects.com
www.freestudentprojects.com
Entity:
The thing which we want to store information. It is an elementary basic building block
of storing information about business process. An entity represents an object defined within
the information system about which you want to store information. Entities are distinct things
in the enterprise.
Boxes are commonly used to represent entities.
Relationships:
A relationship is a named collection or association between entities or used to
relate two or more entities with some common attributes or meaningful interaction between
the objects.
Diamonds are normally used to represent relationships.
Attributes:
Attributes are the properties of the entities and relationship, Descriptor of the
entity. Attributes are elementary pieces of information attached to an entity.
ovals are used to represent attributes.
It shows the key attribute of entity
Which specifies the relationship between entity and relationship.
31
www.freestudentprojects.com
www.freestudentprojects.com
Amount
Password
Details
EDate
Username
Expense
Admin
Employee info
Handles
Serial_no
Qty
Name
DOBex
Address
DOJress
Contain_details
Salary
Price
Color
Ageme
Experience
Itemmaster
Sexlary
Designation
Codeno
Itemdate
itemname
Empid
Description
Totalamount
itemgroup
Serialno
Purchase
cname
Sale
Itemname
Dname
Caddress
Serialno
Qty
Qty
Price
Codeno
Price
Produces
Totalamount
pDate
itemgroup
maxno
Caddress
SDate
Purchase_from
itemname
Bill
Itemgroup
Cname
Totalamount
Price
billno
Qty
Dealer
Itemname
Dname
32
www.freestudentprojects.com
www.freestudentprojects.com
4.9
Data Dictionary
Password
Text
key
Not null
20
name
Password
Description
Item
Serial
Itemgroup
ItemName
Codeno
Description
Text
Text
Number
Text
Primary key
Not null
Not null
Not null,
Not null
number
Company name
ModelName
Item Code
Item
60
10,2
Not null
Not null
Notnull,check>
Description
Date
Color
Quantity
8,2
0
Notnull,check>
Price
Itemdate
Color
Qty
Price
Date
Text
Number
Number
50
50
8,2
70
33
www.freestudentprojects.com
www.freestudentprojects.com
Constraints
Notnull,
pDate
code_no
Date
Number
10,2
foreignkey
number
Not null
Purchase Date
Notnull,,Primary Itemcode
50
50
50
50
10,2
10,2
8,2
key
Not null
Not null
Not null
Not null
Notnull,check>0
Notnull,check>0
Notnull,check>0
DealerName
Itemgroup
ItemName
Description
Price
Qty
TotalAmount
Text
Text
Text
Text
Number
Number
Number
Description
Item
serial
DealerName
Company name
ModelName
Item description
Item Price
Item Quantity
Total Amount
Constraints
Notnull,Primary
Description
Item
Serial
SDate
CName
Caddress
Date
Text
Text
50
50
key
Not null
Not null
Not null
number
Sale Date
Customer Name
CustomerAddres
Itemgroup
ItemName
Price
Text
Text
Number
50
50
10,2
Not null
Not null
Notnull,check>
s
Company name
ModelName
Item Price
Qty
Number
10,2
0
Notnull,check>
Item Quantity
8,2
0
Notnull,check>
Total Amount
TotalAmount
Number
34
www.freestudentprojects.com
www.freestudentprojects.com
Constraints
Notnull,Primary
maxno
Number
8,2
key
Not
50
50
check>0
Not null
Not null
Not null
number
Sale Date
Customer Name
Customer
50
50
10,2
Not null
Not null
Notnull,check>
Address
Company name
Model Name
Item Price
10,2
0
Not
8,2
check>0
Not
SDate
CName
Caddress
Itemgroup
ItemName
Price
Qty
TotalAmount
Date
Text
Text
Text
Text
Number
Number
Number
Description
Bill number
null, Maximum
check>0
Constraints
Not null
Not null
Notnull,check>0
Description
Expense date
Expense detail
Amount
www.freestudentprojects.com
Description
www.freestudentprojects.com
Empid
Number
8,2
Notnull,Primary
Employee id
Name
Text
50
key
Not null
Employee
Age
Address
Sex
Number
Text
Text
8,2
50
50
Not null
Not null
Not null
Name
Age
Address
Employee
10,2
Not null
Not null
Notnull,check>
gender
Designation
Date of birth
Experience
8,2
0
Notnull,doj>dob Date of join
Notnull,check> Salary
Designation
DOB
Experience
DOJ
Salary
Text
Date
Number
Date
Number
70
0
Table Name: Dealer Table
Description: The table stores the Dealer names.
Field Name
Dname
4.10
Constraints
Not null
Description
Dealers name
4.10.1 Responsibility
Essentially, the main role of a database administrator has to do with overseeing the
installation and ongoing function of software on a system designed for use by a number of
users. There are several specific responsibilities that the typical database administrator will
perform in just about any corporate environment.
A basic responsibility for just about every database administrator involves the
installation of new databases. As part of the database installation, the database administrator
will set up login credentials to authorized persons, define the privileges associated with each
authorized user, and ensure that every work station attached to the network is set up to access
the new database. This process usually involves a period of
troubleshooting, in which the database administrator will address and resolve any problems
that users experience with the new product.
36
www.freestudentprojects.com
www.freestudentprojects.com
There are four different types of database administrator jobs: installation, maintenance,
data modeling, and user management. A database administrator is responsible for
managing the database(s) that are used to hold the data for large database-driven
software.
Computers often play an integral role with sales team activities and documentation
tracking. Sales administrator jobs may therefore manage information technology to
minimize electronic data problems.
www.freestudentprojects.com
Processor
133-MHz
Intel
Pentium-class
Hard disk
Memory
processor
5Gb recommended
128MB
of
RAM,256MB
Display
Keyboard
Recommended
Standard output display
Standard Qwerty keyboard
Mouse
Interface
Standard mouse with two buttons
for
38
www.freestudentprojects.com
www.freestudentprojects.com
Architecture
32-bit
64-bit
Processor
Memory (RAM)
1 GB
2 GB
1.0
(Not absolutely necessary; only required for Aero)
Optical drive
4.11.5 Security
Microsoft Access offers several ways to secure the application while allowing users to
remain productive. The most basic is a database password. Once entered, the user has full
control of all the database objects. This is a relatively weak form of protection which can be
easily cracked.
A higher level of protection is the use of workgroup security requiring a user name and
password. Users and groups can be specified along with their rights at the object type or
individual object level. This can be used to specify people with readonly or data entry rights
but may be challenging to specify. A separate workgroup security file contains the settings
which can be used to manage multiple databases. Workgroup security is not supported in the
Access 2007 ACCDB database format, although Access 2007 still supports it for MDB
databases.
Databases can also be encrypted. The ACCDB format offers significantly advanced
encryption from previous versions.
Additionally, if the database design needs to be secured to prevent changes, Access
databases can be locked/protected (and the source code compiled) by converting the database
to a .MDE file. All changes to the VBA project (modules, forms, or reports) need to be made
to the original MDB and then reconverted to MDE. In Access 2007, the ACCDB database is
converted to an ACCDE file. Some tools are available for unlocking and "decompiling",
39
www.freestudentprojects.com
www.freestudentprojects.com
although certain elements including original VBA comments and formatting are normally
irretrievable.
4.13 Recovery
Numerous occurrences could lead to data loss: data or database elements could be
accidentally deleted; data could become corrupted by the addition of bad data; hardware, such
as a disk or server, could fail; or disasters, such as flooding, could destroy your server and
storage media. Since we are using access data in database is automatically stored in c drive.
Backup
The simplest backup technique is the Dump.You need to store the data in the database twice.
as dumping is expensive, it probably cannot be performed as often as one would like.Another
backup technique is we can store our information in Hard Disk,Tape drive,DVD.
A hard disk drive (HDD) is a non-volatile, random access device for digital data. It features
rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is
magnetically read from and written to the platter by read/write heads that float on a film of air
above the platters.Hard disk manufacturers quote disk capacity in multiples of SI-standard
powers of 1000, where a terabyte is 1000 gigabytes and a gigabyte is 1000 megabytes. With
file systems that report capacity in powers of 1024, available space appears somewhat less
than advertised capacity.
40
www.freestudentprojects.com
www.freestudentprojects.com
Chapter 5
Detailed Design
5.1 Introduction
This section describes which are the modules required for implementing the system.
This is done in informal design. Formal design describes the internal of each modules, it
describes the logic implemented in that module to perform the desired function, it shows what
inputs are given and what outputs are coming from that module and how operations are
performed on inputs to get outputs.
The design document is the developers blueprint. It provides precious directions to
software programmers about how basic control and data structures will be organized. The
Design document is written before programming starts. It describes how the software will be
structured and what functionality will be included. This document forms the basis for all
future design and coding.
www.freestudentprojects.com
Itemmaster
Sale
Purchase
Add item
Add sale
Purchase Order
Employee details
Add employee details
Add
Save
Save
Save
Show all
Show all
Show all
Show all
Generate bill
Edit item
Update
Update
Deletee
Delete Sale
Delete item
Delete
Delete
Daily Expense
Reports
Add expense
Stock
save
Sales
Show all
Purchase
Employee details
42
www.freestudentprojects.com
Login
Change password
Change
www.freestudentprojects.com
Itemmaster
Itemname,
Price,qty
qty
Itemname,
Price,qty
qty
Add item
Edit
Delete item
43
www.freestudentprojects.com
instance
www.freestudentprojects.com
Itemname,
custname,
Price,qty
Add sale
Delete sale
44
www.freestudentprojects.com
www.freestudentprojects.com
Purchase
Pdate,Itemname,custname,Price,qty
Purchase details
Purchase Order
Edate,Detail,Amt
Expense details
Add Expense
www.freestudentprojects.com
Details
Empid,name,salary,
Employee details
age
Stock
Sale details
Purchase
Sales
Employee
www.freestudentprojects.com
Username, Password
Change password
5.6.Detailed Design
5.6.1.Itemmaster:
5.6.1.2 Input:- serial no, item name, itemgroup, code no,description, date, color, qty,price.
5.6.1.3 Procedural Details (Flow chart)
Start
False
Is
Input=correct
47
www.freestudentprojects.com
www.freestudentprojects.com
Enter Correctly
True
Exit
Stop
Fig 5.3(a) Itemmaster
5.6.1.4 File I/O interface:This module is not related to other functional components.
5.6.1.5 Output: All the entered data will be stored in respective database and will be
displayed in the grid.
5.6.2 Sale:5.6.2.1 Input:- serialno,sdate, cname, caddress, item group, item name, qty, price, total
amount.
Is
Input=correct
False
Enter Correctly
True
Exit
48
www.freestudentprojects.com
Stop
www.freestudentprojects.com
Is
Input=correct
False
Enter Correctly
True
Exit
www.freestudentprojects.com
49
Stop
www.freestudentprojects.com
Edate,expensedetail,Amount
Is
Input=correct
False
50
www.freestudentprojects.com
Exit
Stop
www.freestudentprojects.com
Enter Correctly
True
Start
empid,name.address,age,sex,designation,D
OB,DOJ,experiencesalary
51
www.freestudentprojects.com
Exit
Stop
www.freestudentprojects.com
Is
Input=correct
False
Enter Correctly
True
5.6.6 Login :
5.6.6.1 Input:- User name and Password.
5.6.6.2 Procedural Details (Flow Chart)
Start
Input Username,Password
52
www.freestudentprojects.com
www.freestudentprojects.com
Is
Input=correct
False
Invalid ID
True
Login
Stop
Fig 5.3(f) Login
5.6.6.3 File I/O interface:Functional components login when clicked after giving the username and password
correctly it takes us to a new page which is the home page, with other functional
components.
5.6.6.4 Output:
Allows administrator to enter into a new page.
Chapter 6
Program Code
6.1 Introduction:
The goal of coding or programming activity is to implement the design in the best possible
manner. The coding activity affects both testing and maintenance profoundly. The goal of
coding should be to reduce the testing and maintenance effort. Hence,during coding the focus
53
www.freestudentprojects.com
www.freestudentprojects.com
should be on developing programs that are easy to read and understand, and simply on
developing programs that are easy to write.
Code for Login form:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.sql.*;
public class LoginForm extends JFrame implements ActionListener
{
JDialog myDialog;
MobMain parent;
JButton b1;
Connection con;
Statement s;
ResultSet rs;
JTextField t1;
JPasswordField t2;
JLabel L1,L2,L3;
public LoginForm(MobMain parent1)
{
this.parent=parent1;
myDialog = new JDialog(parent,"Login Form");
myDialog.setLayout(new FlowLayout());
JPanel mypanel = new JPanel(new GridLayout(4,1));
JPanel panelUser = new JPanel(new GridLayout(1,2));
L1=new JLabel("User Name");
panelUser.add(L1);
t1= new JTextField(10);
panelUser.add(t1);
mypanel.add(panelUser);
54
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
s = con.createStatement();
rs=s.executeQuery("select * from userlog where name='" + t1.getText() + "' and
password='" + t2.getText() + "'");
while(rs.next())
{
System.out.println("hsfhfsdkfhjksdhfksdf");
parent.initial();
myDialog.dispose();
dispose();
}
}catch(Exception ea){}
}
}
}
Main form:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JDesktopPane;
import javax.swing.JComponent;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import java.sql.*;
public class MobMain extends JFrame implements ActionListener
{
56
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
M4.addActionListener(this);
menu6.add(Menu6=new JMenuItem("Add Expense"));
Menu6.addActionListener(this);
menu2.add(Se1=new JMenuItem("Add Sales"));
Se1.addActionListener(this);
Cmenu = new JMenuItem("Change Password");
Cmenu.addActionListener(this);
M6=new JMenuItem("Purchase Order");
M6.addActionListener(this);
M10=new JMenuItem("Stock report");
M10.addActionListener(this);
M11=new JMenuItem("Sales report");
M11.addActionListener(this);
M12=new JMenuItem("Purchase report");
M12.addActionListener(this);
M13=new JMenuItem("Employee report");
M13.addActionListener(this);
menu1.add(M1);
menu1.add(M2);
menu1.add(M5);
menu4.add(M4);
menu1.add(M7);
menu10.add(M10);
menu10.add(M11);
menu10.add(M12);
menu10.add(M13);
Cmenu1.add(Cmenu);
menu2.add(M3);
menu6.add(Menu6);
menu3.add(M6);
mb.add(menu1);
mb.add(menu2);
59
www.freestudentprojects.com
www.freestudentprojects.com
mb.add(menu3);
mb.add(menu4);
mb.add(menu6);
mb.add(menu10);
mb.add(Cmenu1);
add(mb);
new LoginForm(this);
mainframe =new JFrame();
mainframe.setJMenuBar(mb);
mainframe.setContentPane(desktop);
mainframe.setSize(screen.width,screen.height-30);
mainframe.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent we)
{
mainframe.dispose();
System.exit(0);
}
});
}
public void initial()
{
mainframe.setVisible(true);
}
public void paint(Graphics g)
{
Image image= Toolkit.getDefaultToolkit().getImage("C:\\Documents and
Settings\\mobilemgm\\src\\images\\slider-mobile-phones.jpg");
g.drawImage(image,0,0,getSize().width,getSize().height,this);
super.paint(g);
}
public static void main(String args[])
{
60
www.freestudentprojects.com
www.freestudentprojects.com
new MobMain();
}
public void actionPerformed(ActionEvent ae)
{
if (ae.getSource()==M1)
{
System.out.println(M1);
AddItem ed=new AddItem();
ed.jScrollPane3.setVisible(false);
ed.jButton5.setVisible(false);
desktop.add(ed);
ed.setVisible(true);
}
if(ae.getSource()==M13)
{
System.out.println(M2);
Empinfor empf=new Empinfor();
desktop.add(empf);
empf.setVisible(true);
}
if(ae.getSource()==M7){
System.exit(1);
}
if(ae.getSource()==M6)
{
purchase p=new purchase();
desktop.add(p);
p.setVisible(true);
p.jScrollPane2.setVisible(false);
p.jButton5.setVisible(false);
}
if(ae.getSource()==Menu6)
61
www.freestudentprojects.com
www.freestudentprojects.com
{
DialyExpense DE=new DialyExpense();
DE.jScrollPane2.setVisible(false);
DE.jButton5.setVisible(false);
desktop.add(DE);
DE.setVisible(true);
}
if(ae.getSource()==M10)
{
stockreport sr=new stockreport();
desktop.add(sr);
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
rs=st.executeQuery("select modelname,qty,companyname,price from itemmaster ");
int li_row = 0;
while (rs.next())
{
System.out.println("hello");
sr.jTable1.setValueAt(rs.getString(1), li_row, 0);
sr.jTable1.setValueAt(rs.getInt(2), li_row, 1);
sr.jTable1.setValueAt(rs.getString(3), li_row, 2);
sr.jTable1.setValueAt(rs.getInt(4), li_row, 3);
li_row++;
}
}catch(Exception e){}
sr.jTable1.setVisible(true);
sr.setVisible(true);
62
www.freestudentprojects.com
www.freestudentprojects.com
}
if(ae.getSource()==M5)
{
DeleteItem Eitem=new DeleteItem();
desktop.add(Eitem);
Eitem.setVisible(true);
}
if(ae.getSource()==M2)
{
EditItem aitem=new EditItem();
desktop.add(aitem);
aitem.setVisible(true);
}
if(ae.getSource()==Se1)
{
sale sitem=new sale();
desktop.add(sitem);
sitem.setVisible(true);
sitem.jScrollPane2.setVisible(false);
sitem.jButton5.setVisible(false);
}
if(ae.getSource()==M3)
{
DelSale DS=new DelSale();
desktop.add(DS);
DS.setVisible(true);
}
if(ae.getSource()==M11)
{
salesReport sr=new salesReport();
desktop.add(sr);
sr.setVisible(true);
}
63
www.freestudentprojects.com
www.freestudentprojects.com
if(ae.getSource()==M12)
{
purchaseR pr=new purchaseR();
desktop.add(pr);
pr.setVisible(true);
}
if(ae.getSource()==M4)
{
Empinfo1 EI=new Empinfo1();
EI.jLabel13.setVisible(false);
EI.jScrollPane2.setVisible(false);
EI.jButton6.setVisible(false);
desktop.add(EI);
EI.setVisible(true);
}
if(ae.getSource()==Cmenu)
{
System.out.println(ae.getSource());
changeP cp=new changeP();
desktop.add(cp);
cp.setVisible(true);
}
}
}
Add item form:
import java.awt.Color;
import javax.swing.JInternalFrame;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.text.*;
64
www.freestudentprojects.com
www.freestudentprojects.com
import javax.swing.*;
import javax.swing.JOptionPane.*;
import javax.swing.JDesktopPane;
import java.util.Date.*;
import java.util.Calendar;
import javax.swing.*;
import java.awt.*;
import javax.swing.table.AbstractTableModel;
public class AddItem extends JInternalFrame
{
Connection con;
private JDesktopPane desktop;
Statement st;
ResultSet rs;
public AddItem()
{
initComponents();
}
private void jButton5MouseClicked(java.awt.event.MouseEvent evt)
{
jScrollPane3.setVisible(false);
jButton5.setVisible(false);
}
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt)
{
Connection con=null;
Statement st=null;
ResultSet rs=null;
int max2=0;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
65
www.freestudentprojects.com
www.freestudentprojects.com
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String sql3="select max(Serial_no) from itemmaster";
rs=st.executeQuery(sql3);
while(rs.next())
{
max2=rs.getInt(1);
System.out.println(max2);
if(max2==0)
{
max2=101;
jTextField1.setText(Integer.toString(max2));
}else
{
jTextField1.setText(Integer.toString(max2++));
}
}
}catch(Exception e){}
}
private void jTextField1MouseClicked(java.awt.event.MouseEvent evt)
{
Connection con=null;
Statement st=null;
ResultSet rs=null;
int max2=0;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String sql3="select max(Serial_no) from itemmaster";
rs=st.executeQuery(sql3);
while(rs.next())
66
www.freestudentprojects.com
www.freestudentprojects.com
{
max2=rs.getInt(1);
System.out.println(max2);
if(max2==0)
{
max2=101;
jTextField1.setText(Integer.toString(max2));
}
else
{
max2=max2+1;
jTextField1.setText(Integer.toString(max2));
}
}
}catch(Exception e){}
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt)
{
System.out.println("hello");
int row_count=0;
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String sql1="select serial_no,modelname,description,qty,Price from itemmaster ";
rs=st.executeQuery(sql1);
int li_row = 0;
while (rs.next())
{
67
www.freestudentprojects.com
www.freestudentprojects.com
System.out.println("hello");
jTable2.setValueAt(rs.getString(1), li_row, 0);
jTable2.setValueAt(rs.getString(2), li_row, 1);
jTable2.setValueAt(rs.getString(3), li_row, 2);
jTable2.setValueAt(rs.getString(4), li_row, 3);
jTable2.setValueAt(rs.getString(5), li_row, 4);
li_row++;
}
}catch(Exception e){}
}
private void jButton4MouseClicked(java.awt.event.MouseEvent evt)
{
jScrollPane3.setVisible(true);
jTable2.setVisible(true);
jButton5.setVisible(true);
int row_count=0;
Connection con=null;
Statement st=null;
ResultSet rs=null;
String str=null;
int count=0;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String sql1="select serial_no,modelname,description,qty,Price from itemmaster ";
rs=st.executeQuery(sql1);
int li_row = 0;
while (rs.next())
{
System.out.println("hello");
jTable2.setValueAt(rs.getString(1), li_row, 0);
68
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
max2=101;
jTextField1.setText(Integer.toString(max2));
}
else
{
max2=max2+1;
jTextField1.setText(Integer.toString(max2));
}
}
}catch(Exception e){}
}
private void jTextField4FocusGained(java.awt.event.FocusEvent evt)
{
java.util.Date d=new java.util.Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
jTextField4.setText(dateFormat.format(d));
}
private void jButton2MouseClicked(java.awt.event.MouseEvent evt)
{
jTextField9.setText("");
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
}
private void jButton3MouseClicked(java.awt.event.MouseEvent evt)
{
this.dispose();
}
70
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
if((jTextField9.getText().equalsIgnoreCase(s1)) &&
(jTextField5.getText().equalsIgnoreCase(s2)))
{
JOptionPane.showMessageDialog(null,"Item already present.....");
}
else
{
str="insert into itemmaster(Serial_no,ModelName,Companyname,CodeNo,
Description,Stdno,Color,Qty,Price) values('"+jTextField1.getText()+"',
"+jTextField9.getText()+"','"+jTextField5.getText()+"',
'"+jTextField8.getText()+"','"+jTextField7.getText()+"',
'"+jTextField4.getText()+"','"+jTextField6.getText()+"',
"+jTextField2.getText()+","+jTextField3.getText()+")";
System.out.println(str);
i=st.executeUpdate(str);
if(i==1)
{
JOptionPane.showMessageDialog(null,"Item Added to Stock");
}
else
{
JOptionPane.showMessageDialog(null,"Unsuccessful Attempt");
}
}
}
catch(Exception e)
{
e.printStackTrace();
e.getMessage();}
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
72
www.freestudentprojects.com
www.freestudentprojects.com
if (jTextField9.getText().equals("") || jTextField1.getText().equals("") ||
jTextField2.getText().equals("") || jTextField3.getText().equals("") ||
jTextField4.getText().equals("") || jTextField5.getText().equals("") ||
jTextField6.getText().equals("") || jTextField7.getText().equals("") ||
jTextField8.getText().equals(""))
{
JOptionPane.showMessageDialog(null,"Feilds Cannot be Empty");
}
else
{
try
{
int i=1,count=0;
Connection con=null;
Statement st=null;
String str=null;
ResultSet rs=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st = con.createStatement();
str="select modelname,companyname from itemmaster where modelname=
'"+jTextField9.getText()+"' and companyname='"+jTextField5.getText()+"' ";
rs=st.executeQuery(str);
while(rs.next())
{
if((rs.getString(1).equalsIgnoreCase(jTextField9.getText())) &&
(rs.getString(2).equalsIgnoreCase(jTextField5.getText())))
{
JOptionPane.showMessageDialog(null,"Item already present.....");
}
else
{
str="insert into itemmaster(Serial_no,ModelName,Companyname,CodeNo,
Description,Stdno,Color,Qty,Price) values('"+jTextField1.getText()+"',
73
www.freestudentprojects.com
www.freestudentprojects.com
'"+jTextField9.getText()+"','"+jTextField5.getText()+"','"+jTextField8.getText()+"',
'"+jTextField7.getText()+"','"+jTextField4.getText()+"','"+jTextField6.getText()+"',
"+jTextField2.getText()+","+jTextField3.getText()+")";
System.out.println(str);
i=st.executeUpdate(str);
if(i==1)
{
JOptionPane.showMessageDialog(null,"Item Added to Stock");
jTextField1.setText("");
jTextField9.setText("");
jTextField8.setText("");
jTextField7.setText("");
jTextField6.setText("");
jTextField5.setText("");
jTextField4.setText("");
jTextField3.setText("");
jTextField2.setText("");
}
else
{
JOptionPane.showMessageDialog(null,"Unsuccessful Attempt");
}
}}}
catch(Exception e)
{
e.printStackTrace();
e.getMessage();}
}
}
public static void main(String args[])
{
java.awt.EventQueue.invokeLater(new Runnable()
{
74
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String str="select distinct(modelname) from itemmaster";
rs=st.executeQuery(str);
while(rs.next())
{
jComboBox1.addItem(rs.getString(1));
}
}catch(Exception e){}
}
private void jButton1MouseClicked(java.awt.event.MouseEvent evt)
{
Connection con=null;
Statement st=null;
ResultSet rs=null;
int j=1;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String sql1="update itemmaster set description='"+jTextField1.getText()+"',
color='"+jTextField2.getText()+"',price='"+jTextField6.getText()+"',
companyname='"+jTextField5.getText()+"',qty='"+jTextField3.getText()+"' where
modelname='"+jComboBox1.getSelectedItem()+"'";
j=st.executeUpdate(sql1);
System.out.println("j="+j);
if(j==1)
{
JOptionPane.showMessageDialog(null,"Record Updated Successfully");
}
else
76
www.freestudentprojects.com
www.freestudentprojects.com
{
JOptionPane.showMessageDialog(null,"Record Update Failure");
}
}catch(Exception e){e.printStackTrace();e.getMessage();}
}
private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt)
{
String val=jComboBox1.getSelectedItem().toString();
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
rs=st.executeQuery("Select description,color,price,companyname,stdno,qty from
itemmaster where modelname='"+val+"'");
while(rs.next())
{
jTextField1.setText(rs.getString(1));
jTextField2.setText(rs.getString(2));
jTextField6.setText(rs.getString(3));
jTextField5.setText(rs.getString(4));
jTextField4.setText(rs.getString(5));
jTextField3.setText(rs.getString(6));
}
}catch(Exception e){}
}
private void jComboBox1MouseClicked(java.awt.event.MouseEvent evt)
{
Connection con=null;
Statement st=null;
77
www.freestudentprojects.com
www.freestudentprojects.com
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String str="select distinct(modelname) from itemmaster";
rs=st.executeQuery(str);
while(rs.next())
{
jComboBox1.addItem(rs.getString(1));
}
}catch(Exception e){}
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
this.dispose();
}
public static void main(String args[])
{
java.awt.EventQueue.invokeLater(new Runnable()
{
public void run()
{
new EditItem().setVisible(true);
}
});
}}
Delete form:
import javax.swing.JInternalFrame;
import com.sun.media.sound.Toolkit;
import com.sun.org.apache.bcel.internal.classfile.JavaClass;
import java.sql.*;
78
www.freestudentprojects.com
www.freestudentprojects.com
import java.text.SimpleDateFormat;
import java.util.*;
import java.text.*;
import javax.swing.*;
import javax.swing.JOptionPane.*;
import javax.swing.JDesktopPane;
public class DeleteItem extends JInternalFrame
{
Connection con;
private JDesktopPane desktop;
Statement st;
ResultSet rs;
public DeleteItem()
{
initComponents();
}
private void jButton1MouseClicked(java.awt.event.MouseEvent evt)
{
String val=jComboBox1.getSelectedItem().toString();
Connection con=null;
Statement st=null;
ResultSet rs=null;
int count=0;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
rs=st.executeQuery("delete description,color,price,companyname,
stdno,qty from itemmaster where modelname='"+val+"'");
while(rs.next())
79
www.freestudentprojects.com
www.freestudentprojects.com
{
jTextField1.setText("");
jTextField2.setText("");
jTextField6.setText("");
jTextField5.setText("");
jTextField4.setText("");
jTextField3.setText("");
}
}catch(Exception e){}
}
private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt)
{
String val=jComboBox1.getSelectedItem().toString();
Connection con=null;
Statement st=null;
ResultSet rs=null;
int count=0;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
rs=st.executeQuery("Select description,color,price,companyname,
stdno,qty from itemmaster where modelname='"+val+"'");
while(rs.next())
{
jTextField1.setText(rs.getString(1));
jTextField2.setText(rs.getString(2));
jTextField6.setText(rs.getString(3));
jTextField5.setText(rs.getString(4));
jTextField4.setText(rs.getString(5));
jTextField3.setText(rs.getString(6));
}
80
www.freestudentprojects.com
www.freestudentprojects.com
}catch(Exception e){}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
String val=jComboBox1.getSelectedItem().toString();
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
st.executeUpdate("delete description,color,price,companyname,
stdno,qty from itemmaster where modelname='"+val+"'");
JOptionPane.showMessageDialog(null,"Item deleted successfully");
jTextField1.setText(rs.getString(1));
jTextField2.setText(rs.getString(2));
jTextField6.setText(rs.getString(3));
jTextField5.setText(rs.getString(4));
jTextField4.setText(rs.getString(5));
jTextField3.setText(rs.getString(6));
}catch(Exception e){}
}
private void jComboBox1MouseClicked(java.awt.event.MouseEvent evt)
{
Connection con=null;
Statement st=null;
ResultSet rs=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
81
www.freestudentprojects.com
www.freestudentprojects.com
www.freestudentprojects.com
jLabel6.setText(jTextField1.getText());
System.out.println("hello");
int row_count=0;
Connection con=null;
Statement st=null;
ResultSet rs=null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:mob11");
st=con.createStatement();
String str="select cname,caddress,itemgroup,qty,totalamount from sale where
sdate='"+jTextField1.getText()+"'";
rs=st.executeQuery(str);
int li_row = 0;
while(rs.next()){
jTable1.setValueAt(rs.getString(1), li_row, 0);
jTable1.setValueAt(rs.getString(2), li_row, 1);
jTable1.setValueAt(rs.getString(3), li_row, 2);
jTable1.setValueAt(rs.getString(4), li_row, 3);
jTable1.setValueAt(rs.getString(5), li_row, 4);
li_row++;
}
}catch(Exception e){}
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new salesReport().setVisible(true);
}
});
83
www.freestudentprojects.com
www.freestudentprojects.com
}
}
www.freestudentprojects.com
{
s1=rs.getString(1);
s2=rs.getString(2);
}
if((jTextField9.getText().equalsIgnoreCase(s1)) &&
(jTextField5.getText().equalsIgnoreCase(s2)))
{
JOptionPane.showMessageDialog(null,"Item already present.....");
}
else
{
str="insert into itemmaster(Serial_no,ModelName,Companyname,CodeNo,
Description,Stdno,Color,Qty,Price) values('"+jTextField1.getText()+"',
"+jTextField9.getText()+"','"+jTextField5.getText()+"',
'"+jTextField8.getText()+"','"+jTextField7.getText()+"',
'"+jTextField4.getText()+"','"+jTextField6.getText()+"',
"+jTextField2.getText()+","+jTextField3.getText()+")";
System.out.println(str);
i=st.executeUpdate(str);
if(i==1)
{
JOptionPane.showMessageDialog(null,"Item Added to Stock");
}
else
{
JOptionPane.showMessageDialog(null,"Unsuccessful Attempt");
}
}
}
6.3 Recovery
Numerous occurrences could lead to data loss: data or database elements could be accidentally
deleted; data could become corrupted by the addition of bad data; hardware, such as a disk or
85
www.freestudentprojects.com
www.freestudentprojects.com
server, could fail; or disasters, such as flooding, could destroy your server and storage media.
Since we are using access data in database is automatically stored in c drive.
Backup
The simplest backup technique is the Dump. You need to store the data in the database twice.
as dumping is expensive, it probably cannot be performed as often as one would like.Another
backup technique is we can store our information in Hard Disk,Tape drive,DVD.
Chapter 7
User Interface
7.1 Interfaces
Login Screen:
86
www.freestudentprojects.com
www.freestudentprojects.com
The user need to enter the valid user name and password if both are valid then the login
is success and the user is allowed to enter into the mobile store management system. When the
user enters the wrong username or password login is failed.
Itemmaster module:
Here the user can add, update and delete the item as when he needs.
87
www.freestudentprojects.com
www.freestudentprojects.com
Here the user can add newly arrived items. The items will then appear in the grid and
will be stored in database.
Here the admin can update details of item that is stored in database. Here the admin
selects item name from combo box, and he can update item details and updated details will be
stored in database.
88
www.freestudentprojects.com
www.freestudentprojects.com
Here the admin can delete details of item that is stored in database. Here the admin
selects the item name from combo box and when he clicks delete button, item deleted
successfully dialog box will be displayed.
www.freestudentprojects.com
Sales master module has two sub module, Add sales and delete item. Here the user can
sale item .
www.freestudentprojects.com
Bill Form:
Purchase master module has one sub module, purchase order. Here the user can
purchase item
www.freestudentprojects.com
If there is not enough stock user purchases item from a dealer and items will be stored
in database.
Employee details module has one sub module, Add employee details.
www.freestudentprojects.com
Here admin enter the details of new employee , when save button is clicked Employee
details inserted dialog box will be displayed and data entered will be stored in the database .
www.freestudentprojects.com
Here admin enter the details of daily expense , when save button is clicked Expense
for the day is added dialog box will be displayed and data entered will be stored in the
database .
Reports:
Reports module has four sub modules, stock report, sales report, purchase report,
employee report.
94
www.freestudentprojects.com
www.freestudentprojects.com
Stock report:
When user clicked on stock report,all the stock details will be displayed in the grid.
Sales report:
Here admin has to enter the date (dd/mm/yy)in the textbox,when enter key is pressed,all
the sale details will be displayed in the grid.
95
www.freestudentprojects.com
www.freestudentprojects.com
Purchase report:
Here admin has to enter the date (dd/mm/yy)in the textbox,when enter key is pressed,all
the purchase details will be displayed in the grid.
Employee report:
Here the admin selects the empid from combobox ,the employee details of a particular
employee will be displayed
96
www.freestudentprojects.com
www.freestudentprojects.com
Login module:
Here admin has to enter username,old password and new password and when he clicks
change button Password has been change dialog box will be displayed,the changed password
will store in the database.
97
www.freestudentprojects.com
www.freestudentprojects.com
Chapter 8
Test Cases
8.1 Introduction
Systems should not be tested as a single, monolithic unit. The testing process should
therefore proceed in the stages where testing is carried out incrementally in conjunction with
system implementation. Errors in program components may come to light at a later stage of
the testing process. The process is therefore an iterative one with information being fed back
from later stage to earlier parts of the process.
Following are the main testing levels:
Unit Testing.
Integration Testing.
Validation.
System Testing.
Unit Testing:
Unit testing focuses verification efforts on the smaller unit of software design. Using the
detailed design description as a guide, important control paths are tested to uncover errors
within the boundary of the module. The relative complexity of the test and the error detected
as a result is limited by the constraint scope established for unit testing. The unit test is always
while box oriented, and the step can be conducted in parallel for multiple modules.
Integration Testing:
With unit testing the modules may function properly, but at times they may have
inadvertent affect on another, sub function, when combined, may not produce the desired
major functions; individually acceptable impression may be signed to unacceptable levels then
global data structure may present problems.
Integration testing is a systematic technique for constructing the program structure
while at the same time conducting tests to uncover errors associated with interfacing. The
objective is to take unit tested modules and build a program structure that has been dictated by
the design.
Validation Testing:
At the culmination of integration testing software is completely assembled as a
package, interfacing errors have been uncovered and corrected, and final series of software
test validation test may begin. Validation can be defined in many ways, but a simple definition
98
www.freestudentprojects.com
www.freestudentprojects.com
is that validation succeeds when the software functions a manner that can be reasonable and
excepted by the customer.
System Testing:
In system testing the software engineer should anticipate potential interfacing
problems such as:
Design error-handling paths that all information coming from other elements of
the system.
Conduct a series of tests that simulate bad data or potential errors at the software
interfaces.
Record the results of the test to use as a proof for future reference.
Participate into planning and design of the system test to ensure that the software
is adequately tested.
8.2Test Reports:
Form Name: Login
Table 8.1 Login form
SL.No
User Action
Expected Result
(Button)
Login
The user need to enter The user is able to enter into Pass
valid
user
password
error
Observed Output
name
otherwise
message
will
visible.
99
www.freestudentprojects.com
Result
www.freestudentprojects.com
User Action
Expected Result
Observed Output
(Button)
Add
The user can enter and When clicked on the add Pass
store a new items.
Result
Refresh
be displayed.
This is an option to clear When clicked on the refresh Pass
all the fields.
Show all
the database.
This is an option to When clicked on the show all Pass
display all the fields in button the user is visible to
the table.
4
5
Close
below.
This is an option to close When clicked on the close Pass
Exit
100
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Expected Result
Observed Output
Result
(Button)
Update
were
earlier.
2
Exit
stored in database.
This is an option to close When clicked on the exit Pass
the active form.
User Action
Expected Result
Observed Output
(Button)
Delete
Result
Pass
were
earlier.
deleted
successfully
Exit
the
information
gets
101
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Expected Result
Observed Output
Result
(Button)
Save
The user can enter and When clicked on the save Pass
store a particular item button all the details will be
details
and
details.
2
Refresh
Show all
4
5
Close
grid below.
This is an option to close When clicked on the close Pass
Exit
102
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Expected Result
(Button)
Delete
the
sale
Observed Output
Result
deleted,
item
deleted
displayed.
and
the
Exit
103
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Expected Result
Observed Output
Result
(Button)
Save
Refresh
Show all
Close
grid below.
This is an option to close When clicked on the close Pass
Exit
104
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Save
Expected Result
Observed Output
Result
The user can enter and When clicked on the save button Pass
store a employee details.
database
and
employee
Show all
displayed.
This is an option to When clicked on the show all Pass
display all the fields in button the user is visible to view
Update
the table.
the stored data in the grid below.
This is an option to After all the information is Pass
update
the
Delete
stored in database.
This is an option to When clicked on the delete Pass
delete
the
the
information
gets
Close
Refresh
www.freestudentprojects.com
www.freestudentprojects.com
User Action
Expected Result
o
1
(Button)
Save
daily
Observed Output
Result
information.
Refresh
displayed.
This is an option to clear When clicked on the Pass
all the fields.
refresh
button
the
data
gets
Show all
database.
This is an option to display When clicked on the Pass
all the fields in the table.
Close
grid below.
This is an option to close When clicked on the Pass
the active table.
Exit
table closes.
This is an option to close When clicked on the Pass
the active form.
106
www.freestudentprojects.com
of
add
item
www.freestudentprojects.com
User Action
Expected Result
Observed Output
Result
o
1
(Button)
Change
and
new
matches.
2
Refresh
in the database
This is an option to clear When clicked on the Pass
all the fields.
refresh
button
the
data
gets
107
www.freestudentprojects.com
www.freestudentprojects.com
Chapter 9
User Manual
Introduction:
A good user interface design is one of the most crucial aspects of any system. The goal
of the interface design is to provide an easy and simple way for users to interact with the
system by hiding all the complexities of the system. A good interface certainly helps to
achieve these goals.
The system front end is designed with the following objectives keeping in mind.
1.Capture information for storage and later use by system users.
2.Retrieve information often called system output.
3.Support of regular operation such as calculating bill and generating reports.
Another objective of the system is user friendliness. That the interface should be
helpful, tolerant and adaptable and the user should be happy and confident to use it.
The system follows the interactive interface strategy in that a set of forms is presented
to the screen and the user is requested fill in the forms. Several labeled field are provided and
the user enters data into the blank spaces.
Login screen:
108
www.freestudentprojects.com
www.freestudentprojects.com
Home page:
109
www.freestudentprojects.com
www.freestudentprojects.com
110
www.freestudentprojects.com
www.freestudentprojects.com
ADD: When clicked on the add button all the details will be stored to the database and item
added to stock dialog box will be displayed.
REFRESH: When clicked on the refresh button the fields that were filled with the data
gets deleted from all the fields but not from the database.
SHOW ALL: When clicked on the show all button the user is visible to view the stored
data in the grid below.
EXIT: When clicked on the exit button the active form of add item closes.
CLOSE: When clicked on the close button the active table closes.
111
www.freestudentprojects.com
www.freestudentprojects.com
112
www.freestudentprojects.com
www.freestudentprojects.com
113
www.freestudentprojects.com
www.freestudentprojects.com
114
www.freestudentprojects.com
www.freestudentprojects.com
Bill form:
www.freestudentprojects.com
GENERATE BILL: When clicked on the generate bill button the bill is generated for
customer and details is stored in the database.
EXIT: When clicked on the exit button the active form of add sale closes.
CLOSE: When clicked on the close button the active table closes.
Delete sale form:
116
www.freestudentprojects.com
www.freestudentprojects.com
Purchase form:
117
www.freestudentprojects.com
www.freestudentprojects.com
SAVE: When clicked on the save button all the details will be stored to the database and sales
entry completed dialog box will be displayed.
REFRESH: When clicked on the refresh button the fields that were filled with the data gets
deleted from all the fields but not from the database.
SHOW ALL: When clicked on the show all button the user is visible to view the stored data
in the grid below.
EXIT: When clicked on the exit button the active form of purchase order close.
SAVE: When clicked on the save button all the details will be stored to the database and sales
entry completed dialog box will be displayed.
REFRESH: When clicked on the refresh button the fields that were filled with the data gets
deleted from all the fields but not from the database.
SHOW ALL: When clicked on the show all button the user is visible to view the stored data
in the grid below.
EXIT: When clicked on the exit button the active form of purchase order close.
CLOSE: When clicked on the close button the active table closes.
118
www.freestudentprojects.com
www.freestudentprojects.com
Employee Details:
119
www.freestudentprojects.com
www.freestudentprojects.com
120
www.freestudentprojects.com
www.freestudentprojects.com
121
www.freestudentprojects.com
www.freestudentprojects.com
122
www.freestudentprojects.com
www.freestudentprojects.com
Daily Expense:
123
www.freestudentprojects.com
www.freestudentprojects.com
SAVE: When clicked on the save button all the details will be stored to the database and sales
entry completed dialog box will be displayed.
REFRESH: When clicked on the refresh button the fields that were filled with the data gets
deleted from all the fields but not from the database.
SHOW ALL: When clicked on the show all button the user is visible to view the stored data
in the grid below.
CLOSE: When clicked on the close button the active table closes.
EXIT: When clicked on the exit button the active form of add expense close.
124
www.freestudentprojects.com
www.freestudentprojects.com
Reports form
www.freestudentprojects.com
Sale report:
Here admin has to enter the date (dd/mm/yy) in the textbox, when enter key is pressed, all the
sale details will be displayed in the grid.
Purchase report:
www.freestudentprojects.com
Employee report
127
www.freestudentprojects.com
www.freestudentprojects.com
128
www.freestudentprojects.com
www.freestudentprojects.com
VI. CONCLUSION
The project Mobile Store Management has been created with the intention of
providing an user with application which will suffice all needs for the details of mobile phones
and other updates.
All the requirements specifications was followed as for as possible and few additional
features were added that can make the application more user friendly and less complicated.
The project Mobile Store Management has been developed with the proper
guidance from the client.
A fully fledged user manual for this system is provided to the user for future working
and functional references.
We hope that Mobile Store Management fulfils all the needs in possible manner.
Limitations:
Employee has to go through many records to find any particular transaction, which can
take up a lot of time and effort.
In case casher forgot any items code it is difficult to calculate the amount, it can create
some other problem.
End user should have the basic knowledge of the computers.
Future enhancement:
This involves provided new future such as
129
www.freestudentprojects.com
www.freestudentprojects.com
130
www.freestudentprojects.com
www.freestudentprojects.com
VII. BIBLIOGRAPHY
TITLE
AUTHOR
PUBLISHER
YEAR
Fundamentals of
Elmasri and
Addison Wesley
1997
database systems
The complete
B.Navathe
Herbert schildt
Longman
TMH
1997
reference java II
System Analysis and
Igor Hawryszlsiewycz
TMH
1998
Pankaj Jalote.
NAROSA
1997
Approach to Software
PUBLISHING
Engineering
The Java Hand book
HOUSE
TMH
Patrick Naughton.
131
www.freestudentprojects.com
1997