You are on page 1of 62

1

Project Report
On
STUDENT MANAGEMENT
SYSTEM

(100220314279)
Manpreet Singh
(100220314345)
Prahlad Singh
(100220314355)
Guided By:
Mr. Sarvesh Chopra


CT Institute of Engineering and Technology, Shahpur,
Jalandhar
2010 to 2014



ACKNOWLEDGEMENT

2


It is out pleasure to acknowledge the help we have received from different individuals and
Punjab technical Board during the project based training period.
Firstly I would love to thanks god who gave me the power, intelligence, courage and resources to
complete the project work.
Secondly, sincere appreciation and wholehearted sense of gratitude goes to respected Mr.
Sarvesh Chopra, (Head Trainer & Project Guide), for his guidance, constructive comments,
valuable suggestions and inspirations. During the entire training session, we have received
endless help from him. Also, it gives us immense pleasure to express our sincere and gratitude to
our esteemed Sub-Trainers there at CT , for their invaluable and untiring guidance and
supervision throughout our training Period .To derive benefits of their enormous experience, it is
a matter of great privilege for us.
We also take this opportunity to express our sincere thanks and full appreciation to Ms. Manju
Bala (HOD,CSE/IT) CT Institute of Engineering. Management & Technology who extended
their wholehearted cooperation, moral support and rendering ungrudging assistance whenever
and wherever need aroused. We are very Thankful to them.
Finally, we wish to say thanks to my Parents without them the project would have been a far
reality and my friends who supported me throughout my work.










TABLE OF CONTENTS

1. Objective & Scope of the Project.1

3

1.1 Objective.1-2
1.2 Scope......3
2. Background......4
3. System Study5
3.1 Problems with the Existing System.5-6
3.2 Proposed System Study..7
4. Feasibility Study8
4.1 Economic Feasibility...8
4.2 Technical Feasibility8
4.3 Social Feasibility......9
4.4 Schedule Feasibility.9
4.5 Motivational Feasibility9
5. System Analysis...10
5.1 Problem Understanding.10
5.2 Requirement Specification11
5.3 System DFD Diagram..11-13
6. Hardware and Software Requirements....14
6.1 Hardware Specification.14
6.2 Software Requirements.15
7. Design Tools..16
7.1 Front End Tool.....16-17
7.2 Back End Tool..18
8. System Design....19
8.1 User Pages....20
8.2 Admin Pages21
8.3 Database Design..22
8.4 Normalization..22
8.5 Tables..25-28
9. Screenshots....29
9.1 User Pages..29-35
9.2 Admin Pages...35-38

4

10. Source Code39-65
11. Testing..........66
11.1 Levels of Testing..67-69
11.2 Test Plan........69
12. Security Mechanism.70
13. Implementation & Maintenance.71
13.1 Implementation.....71
13.2 Maintenance72
14. Conclusion...73
15. Bibliography74



















5









OBJECTIVE & SCOPE OF THE PROJECT


OBJECTIVE:
The objective is to design a system that can integrate all the above features in a single system, so
that it can be easy to use .The new system should have all the records and files of the old system
in a comprehensively linked manner so that whenever we want to retrieve some information, it
can be done in an efficient manner.

The system should be a one-step shop solution where all the different jobs regarding the various
operations and functions in the centers can be done on a single window with least hassle. That is,
the new system should be able to do work in the least amount of time and with much more
efficiency and effectiveness than the existing system.

The designing aspects of new system should be aimed towards basing all the data fields and data
records in a single database, from where any operation on the data or data retrieval can be done
easily. It should be designed in such a way that only the required information is displayed when
asked for. Not like the manual system where one has to search in hard copy files to look for a
particular record.


6

It should remove, if not all majority of the problems that exists in the old system. Also it should
be compatible, easy to understand and easy to modify.

The aim would be to remove as many problems as possible from the existing system and design
the new system in such a manner that it looks a very comprehensive approach to the stated
objectives. The organization structure of the old system should be clearly understood so that the
objectives it aims to achieve can be designed.


There should be complete interaction between the various sub-systems of the main system so that
there can be efficient functioning of the system. Every component of the system should be able
to interact with other components through a common interface. There should be such an
interaction interface, that if one component wants the output from other sub-system then it can
do so freely and without hindrance.

Also all sub-systems should be interdependent on each other and also independent, it means that
whenever some sub-system wants some information from other sub-system, it can do so without
any problem, also when a system functions independently then it does not have to wait for data
to be processed. All the sub-systems should be performing the designed operations on the given
data in a comprehensive manner so that all of them are aimed towards achieving a common goal.

The main objectives of the new system are mentioned below:-

1. Fast and Efficient: - As compared to existing system, in new system the user can get the
information fast, easily and efficiently from the software.

2. Reliable and accurate:-As in new system, the information is stored and processed in
computers so that data will be more reliable and accurate.


7

3. Centralized Data:-In the existing system, data records are kept under file maintenance system
due to this system the placement of the data is not at one particular place. But in new system,
each and every record is maintained on computer, which leads to the centralization of data.

4. Non Redundant Information: - As in proposed system data is maintained on the computers
so inconsistency does not occur which will never lead to problem like duplication of data.

5. Easy to Access:-As compared to existing system, in new system the users can easily and
efficiently accesses the information from the computer.

6. No Documentation:-As everything is stored on the computer, so there is no need of
documentation or maintaining the files.

SCOPE:

This project is on BILLING SYSTEM. So more features can be added in this project, to
expand it. As we know that the today the technology is changing day by day.

Future Recommendations:

1. Use new more short coding method in .NET language for this software.
2. Modification In Database.
3. More User friendly.
4. More Robust.
5. Add Accounting feature to this software







8














FEASIBILITY STUDY

The objective of initial investigation is to determine whether the request is valid and feasible
before a recommendation is reached to do nothing, improves, or modify the existing system or a
build a new one. Depending on the results of initial investigation, the survey is expanded to a
more detailed feasibility study. A feasibility study is a test of a system proposal according to its
workability, impact on the organization, ability to meet user needs and effective use of racemes.

Economic Feasibility
Economic analysis is the most frequently used method for evaluating the effectiveness of a
candidate system. A procedure of cost/benefit analysis is applied to determine the savings and
benefits that are expected from the candidate system and then compare them with the costs. If
benefits out sight the costs, then the decision is made to design and implement the system.
Before the development of the project, there are a lot of problems in preparing reports of the
costs and calculations of the cost of various products.


9

In existing system, which is not automated, involves lot of paper work, which is not economical
in terms of time and money. So to overcome this problem website is required, which will
automate the above stated tasks. It is found that implementation of software package is
economically feasible than the existing system because it reduces time and money.

Technical Feasibility
As we have been seen that my project is economically feasible and the management can afford
the computers, hence all we need is to install new systems and have an Internet Connection.
After this, we can run this software on the computers.





Social Feasibility
It is important to study that the social implications when a new system is introduced. People are
inherently resistant to change and computers have been known to facilitate change. An estimate
was made of how strong reaction user staff is likely to have towards the development of a
computerized system.
It is undesirable that introduction of the candidate system requires special effect to educate; sell
and train the staff on new ways of providing help and better treatment to needy masses. But in
my case most of the staff is not habitual, using the computer system still they gave a good
response and after a small period of training they would be able to efficiently use the system
because much stress would lay on the user friendliness of the system.

Schedule Feasibility
It is the project deadline reasonable. Some projects are initiated with specific deadline you need
to determine whether the deadline are mandatory or desirable. It is preferable to deliver a
properly functioning system two months later than to deliver an error prone useless system on
time. Inadequate system is worse. Its a choice between the lesser of to evils. So keeping in view

10

the above statement we decided to keep my deadline mandatory. We extended our deadline to
give an error free software package

Motivational Feasibility
To achieve the desired objective it is necessary to motivate the developer group. Motivational
feasibility means to coach and direct individual to overcome difference and achieve project goals
as a team.




SYSTEM ANALYSIS
Analysis is a detailed study of the various operations performed by a system and their
relationships within and outside the system. A key question is, what must be done to solve a
problem? System analysis is the application of the systems approach to the study and solution of
problems using computer-based system. System analysis focuses on the system, process and the
technology. There are some logical data models and tools used in the analysis. To solve the
problem we have used Data flow diagrams (DFD), flowcharts, existing are some examples of
this.

Problem Understanding

One must know what the problem is, before it can be solved. The basis for candidate system is
recognition of need for improving and information system or a procedure. If a problem is serious
enough Automation of Railway Workshop may want to have an analyst look at it. Such an
assignment implies a commitment, especially if analyst is hired from outside. In larger
environment, where formal procedures are the norm the analysts first task is prepare a statement

11

specifying the scope and objective of the problem. One can then reduce it with the employee for
accuracy. However, an accurate cost of the next phase-feasibility study can be produced.




12

4.2 Requirement Specification

The first step in the system development life cycle is the identification of the needs. This is a
users request to change, improve or enhance an existing system. Because there is likely to be a
stream of such requests, standard procedures must be established to deal with them. The
preliminary investigation is one way of handling this. The objective is to determine whether the
request is valid and feasible before a recommendation is reached to do nothing, improve or
modify the existing system or build a new one.
























13


HARDWARE AND SOFTWARE REQUIREMENTS

Hardware Requirements:
The basic minimum hardware requirement for operating this project efficiency is:

CPU:
Type Specification
Processor Pentium 166M Hz or up
Speed 266 MHZ or more
RAM 256 MB or more
Cache Memory 512 KB or more

Peripherals:
Type Specification
Monitor VGA Color
Mouse Serial
Keyboard Standard
Printer Color/black & white


Storage Media:
Type Specification
Hard Disk 1.2 GB or more
Floppy Disk 1.44MB
CD-ROM 48x/52x





14


SOFTWARE REQUIREMENTS:

The software requirements for this project are:

Operating System 32/x-64 based version of
Windows Server 2003,
Windows XP,Windows 7

Front end Java jdk 7

Backend My SQL

Software used Net Beans IDE 7.0.1
My SQL workbench

















15


FRONT END TOOLS

Java and JDK 7:
Java is an object-oriented programming language with a built-in application programming
interface (API) that can handle graphics and user interfaces and that can be used to create
applications or applets. Because of its rich set of API's, similar to Macintosh and Windows, and
its platform independence, Java can also be thought of as a platform in itself. Java also has
standard libraries for doing mathematics.
Much of the syntax of Java is the same as C and C++. One major difference is that Java does not
have pointers. However, the biggest difference is that you must write object oriented code in
Java. Procedural pieces of code can only be embedded in objects. In the following we assume
that the reader has some familiarity with a programming language. In particular, some familiarity
with the syntax of C/C++ is useful.
In Java we distinguish between applications, which are programs that perform the same functions
as those written in other programming languages, and applets, which are programs that can be
embedded in a Web page and accessed over the Internet. Our initial focus will be on writing
applications. When a program is compiled, a byte code is produced that can be read and executed
by any platform that can run Java.
As we know that the Java is an object oriented programming language developed by Sun
Microsystems of USA in 1991. Java is first programming language which is not attached with
any particular hardware or operating system. Program developed in Java can be executed
anywhere and on any system.
Features of Java are as follows:
1. Compiled and Interpreted
2. Platform Independent and portable
3. Object- oriented


16


4. Robust and secure
5. Distributed
6. Familiar, simple and small
7. Multithreaded and Interactive
8. High performance
9. Dynamic and Extensible

JDK 7:
The Java Development Kit (JDK) is an implementation of either one of the Java SE, Java
EE or Java ME platforms released by Oracle Corporation in the form of a binary product aimed
at Java developers on Solaris, Linux, Mac OS X or Windows. Since the introduction
of Java platform, it has been by far the most widely used Software Development Kit (SDK).On
17 November 2006, Sun announced that it would be released under the GNU General Public
License (GPL), thus making it free software.
This happened in large part on 8 May 2007, when Sun contributed the source code to the Open
JDK.
Java Platform, Enterprise Edition 7 (Java EE 7) offers new features that enhance HTML5
support, increase developer productivity, and further improves how enterprise demands can be
met. Java EE 7 developers will write less boilerplate code, have better support for the latest Web
applications and frameworks, and gain access to enhanced scalability and richer, simpler
functionality. Enterprises will benefit from new features that enable portable batch processing
and improved scalability.









17



BACK END TOOLS
My SQL:
HI STORY :
The history of SQL and relational databases traces back to E.F. Codd, an IBM researcher who
first published an article on the relational database idea in June1970. Codd's article started a
flurry of research, including a major project at IBM. Part of this project was a database query
language named SEQUEL, an acronym for Structured English Query Language. The name was
later changed to SQL for legal reasons, but many people still pronounce it SEQUEL to this day.
IBM published many articles in technical journals about its SQL database language, and in the
late 70's two other companies were started to develop similar products, which became Oracle and
Ingres. By 1985 Oracle claimed to have over 1000installations. In the late 80's and early 90's
SQL products multiplied and became virtually the standard for database management in medium
to large organizations, especially on UNIX and mainframes.

THE SQL LANGUAGE
The SQL "language" allows anyone with a computer terminal to access and use relational
databases. SQL uses about 30 simple "english like" commands like Open, Close, Select, and
Update to operate the database. For example, the SQL command shown below could be use to
select all database records in the "Western" region. SELECT * WHERE Region="Western"
Although SQL can be used directly by simply typing in commands like this, the SQL language is
tricky for non-programmers to learn. Panorama allows you to access your database using a
standard Macintosh graphical interface. Panorama then translates your mouse clicks and
keyboard taps into the SQL language and passes them on to the SQL server. One of the major
benefits of SQL is that it provides a more or less standard way to access and use database
systems from a variety of vendors. For example, the SELECT statement listed in the previous
section would work exactly the same on Butler, Oracle, Sybase, DB2, or any other SQL based
database on any host machine.



18


SYSTEM DESIGN

System design is a highly creative process. It considers how the problem must be solved.

The term design describes a final system and process by which it is developed. It includes the
construction of program and program testing.

A systematic method has to achieve the beneficial result. It involves starting with a vague idea
and developing it into a series of steps. The series of steps for successful system development or
successful system design are given below: -

First step is to study the problem completely because first of all I should know the goal, which I
have to achieve. Second I should see what kind of input I require and what kind of output I give
so that I can get desired output from the system. It is very challenging step of the system
development. According to input requirement of the system the structures of various databases
should be designed. Next I should know that what kind of web pages should develop to reach the
final goal. By creating individual pages for different categories the whole project BILLING
SYSTEM get created.












19

Database design:-

A carefully thought-out database design forms the foundation for future success. These links will
help you plan your database designs to maintain performance and integrity through future
growth. Databases use tables to organize information. Each table consists of a number of rows,
each of which corresponds to a single database record. So, how do databases keep all of these
records straight? Its through the use of keys. What is a Database? Databases are designed to
offer an organized mechanism for storing, managing and retrieving information. Databases
depend upon keys to store, sort and compare records.

6.4.1 NORMALIZATION

Normalization is a design technique that is widely used as a guide in designing relational
databases. Normalization is essentially a two-step process that puts data into tabular form by
removing repeating groups and then removes duplication from relational tables. Normalization
theory is based on the concept of normal forms. A relational table is said to be in a particular
normal form if it satisfies a certain set of constraints.

Normalization of data can be considered as a process of analyzing the given relation between
schemas based on their functional dependencies and primary key to achieve the required
properties like minimizing redundancy and minimizing anomalies (insertion, deletion and
updation anomalies.

RULES OF NORMALIZATION

There are several rules of normalization attached to a relational database. This normalization is
done in order to
Reduce the problems of data redundancy in the database design.
Ensure the data model is complete and correct.
Maximize query flexibility and
Eliminate insertion, deletion, and modification anomalies.

20


There are currently five normal forms :-

1.First normal form (1NF)
2.Second normal form (2NF)
3.Third normal form (3NF)
4.Fourth normal form (4NF)
5.Fifth normal form (5NF)

1.First normal form (1NF):-

A table is said to be in first normal forms (1NF), if
There are no duplicated rows in the table.
Each cell is single-valued (i.e., there are no repeating groups or arrays)
Entries in a column (attribute, field) are of the same kind.

2. Second normal form (2NF):-

A table is said to be in second normal form (2NF), if
It is in the first normal form (1NF) and
All non-key attributes are dependent on the entire key. That is non-key attributes are fully
dependent on the whole key. Further, if the key has more than one attribute then no non-
key attributes should be functionally dependent upon a part of the key attributes.
Thus a table is in 2NF, i.e. every non-key attribute depends on the entire key.

3.Third normal form (3NF):-

A table is said to be in third normal form (3NF), if
It is in the second normal form
All the non-key attributes of the relation are independent of all other non-key attributes of
the relation.

21


Thus a relation is in third normal form, if it is in 2NF and no non-prime attribute is functionally
dependent on other non-prime attribute. If two non-key attributes are functionally dependent,
then relation is not in 3NF.

BCNF (Boyce codd norm form)
A relation is said to be in BCNF if, it is in 3NF and no dependency of an attribute of a multi
attribute key on an attribute of another (overlapping) multiattribute key. That is, there is no
transitive functional dependency.

4.Fourth normal form (4NF):-

A relation is in the fourth normal form if it is in BCNF and it has not more than one independent
multivauled dependency.

5.Fifth normal form (5NF):-

Fifth normal form is designed to deal with a type of dependency known as a join dependency.
When a relation has a join dependency, it cannot be divided into two (or more) relations such
that the resulting tables can be recombined to form the original table.
A relation is in fifth normal form, if it is in 4NF and does not have a join dependency.











22

SCREEN SHOTS













23




24








25


26


27


28


29


30















31

CODING

Login page:-
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package billing.system;

import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.imageio.ImageIO;
import javax.print.Doc;
import javax.print.DocFlavor;
import javax.print.DocPrintJob;

32

import javax.print.PrintException;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.SimpleDoc;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.Copies;
import javax.swing.JOptionPane;
import javax.swing.UIManager;


/**
*
* @author Lakshit
*/
public class login extends javax.swing.JFrame {


String Uname;String Pname;
/**
* Creates new form login
*/
public login() {
initComponents();
}
public static BufferedImage getScreenShot(Component component)
{
BufferedImage image=new
BufferedImage(component.getWidth(),component.getHeight(),BufferedImage.TYPE_INT_RGB
);
component.paint(image.getGraphics());

33

return image;
}


public static void saveScreenShot(Component component,String filename) throws Exception
{
BufferedImage img=getScreenShot(component);
ImageIO.write(img,"png", new File(filename));
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMaximumSize(new java.awt.Dimension(1024, 768));

34

setMinimumSize(new java.awt.Dimension(1024, 768));
setPreferredSize(new java.awt.Dimension(1024, 768));
setResizable(false);
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jPanel2.setBorder(new javax.swing.border.MatteBorder(null));

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel1.setText(" LOGIN");
jLabel1.addMouseWheelListener(new java.awt.event.MouseWheelListener() {
public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
jLabel1MouseWheelMoved(evt);
}
});

jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel2.setText("USERNAME");

jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel3.setText("PASSWORD");

jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jPasswordField1ActionPerformed(evt);
}

35

});

jButton1.setText("LOGIN");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jButton2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jButton2.setText("Not Registered Yet? Register Now");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jButton3.setText("Take Pic");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});

jButton4.setText("print");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});


36

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(162, 162, 162)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 236,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(85, 85, 85)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 152,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 128,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(89, 89, 89)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1)
.addComponent(jPasswordField1, javax.swing.GroupLayout.DEFAULT_SIZE,
201, Short.MAX_VALUE)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(204, 204, 204)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 145,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()

37

.addGap(36, 36, 36)
.addComponent(jButton3)
.addGap(52, 52, 52)
.addComponent(jButton2)))
.addContainerGap(36, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(jButton4)
.addGap(71, 71, 71))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(45, 45, 45)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 55,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(95, 95, 95)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(65, 65, 65)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(jLabel3)

38

.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(65, 65, 65)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton4)
.addGap(9, 9, 9)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(jButton2)
.addComponent(jButton3))
.addContainerGap(35, Short.MAX_VALUE))
);

getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(230,
140, -1, -1));

setSize(new java.awt.Dimension(1032, 802));
setLocationRelativeTo(null);
}// </editor-fold>

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}


39

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String path="jdbc:mysql://localhost/"; //path
String place="billing";

try {

Class.forName("com.mysql.jdbc.Driver"); //driver

Connection myconnection=DriverManager.getConnection(path+place,"root","root");

try {
String b="select * from login where username=? and password=?";

PreparedStatement mystatement=myconnection.prepareStatement(b);

mystatement.setString(1,jTextField1.getText());
mystatement.setString(2,jPasswordField1.getText());
ResultSet myresult= mystatement.executeQuery();
if(myresult.next()==true)
{
Uname=myresult.getString("username");
Pname=myresult.getString("password");
}
if(jTextField1.getText().toString().equals("") )
{
JOptionPane.showMessageDialog(rootPane,"Invalid Username And Password",
"message", 1);
//jLabel4.setText("Not a Valid User");
JOptionPane.showMessageDialog(rootPane, "Invalid Username And Password");
//JOptionPane.showInternalConfirmDialog(rootPane, "enter a valid username");
}

40

else if(jPasswordField1.getText().toString().equals(""))
{
JOptionPane.showMessageDialog(rootPane,"Invalid Username And Password",
"message", 1);
}

else if(!jTextField1.getText().equals(Uname) )
{
//jLabel4.setText("Not a Valid User");
JOptionPane.showMessageDialog(rootPane, "Invalid Username And Password");
}

else if(!jPasswordField1.getText().equals(Pname))
{
JOptionPane.showMessageDialog(rootPane,"Invalid Username And Password",
"message", 1);
}
else if(jTextField1.getText().equals(Uname) &&
jPasswordField1.getText().equals(Pname))
{
Background obj=new Background();
obj.setVisible(true);
this.setVisible(false);
}
/* else
{
JOptionPane.showMessageDialog(rootPane, "Invalid Username And Password");
}*/
}



41

// int x=mystatement.executeUpdate();
// if(x==1)
// {
// JOptionPane.showMessageDialog(rootPane, "Customer created Successfully");
// }


catch(Exception e) {
JOptionPane.showMessageDialog(rootPane, e.getMessage());
}
myconnection.close();
} catch(Exception e) {
JOptionPane.showMessageDialog(rootPane, e.getMessage());
}
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
newuser obj=new newuser();
obj.setVisible(true);
this.setVisible(false);
}

private void jLabel1MouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
// TODO add your handling code here:
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {


try
{

42

saveScreenShot(jPanel2,"my_panel_image.png");
}
catch(Exception e)
{

}

try {
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(new Copies(1));

PrintService pss[] =
PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.GIF, pras);

if (pss.length == 0)
throw new RuntimeException("No printer services available.");

PrintService ps = pss[0];
System.out.println("Printing to " + ps);

DocPrintJob job = ps.createPrintJob();

FileInputStream fin = new FileInputStream("my_panel_image.png");
Doc doc = new SimpleDoc(fin, DocFlavor.INPUT_STREAM.GIF, null);

job.print(doc, pras);

fin.close();
} catch (IOException ie) {
ie.printStackTrace();
} catch (PrintException pe) {

43

pe.printStackTrace();
}
}

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
try{


PrinterJob printerJob = PrinterJob.getPrinterJob();

PageFormat pageFormat = printerJob.defaultPage();
// try {
// job.print();
//} catch (PrinterException ex) {
/* The job did not successfully complete */
// }
// }
// }
pageFormat.setOrientation(PageFormat.PORTRAIT);
pageFormat = printerJob.pageDialog(pageFormat);
printerJob.setPrintable(new CustomPaintComponent(), pageFormat);
try {
if(printerJob.printDialog()) {

printerJob.print();

}
}
catch (PrinterException e) {

System.out.println("Printer exception : " + e.getMessage());

44


}



// createImage(jPanel1);
}
catch(Exception e){

}
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
/* if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}*/
UIManager.setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel");
}
} catch (ClassNotFoundException ex) {

45


java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(login.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new login().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JLabel jLabel1;

46

private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel2;
private javax.swing.JPasswordField jPasswordField1;
private javax.swing.JTextField jTextField1;
// End of variables declaration
}

























47

New user:-

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package billing.system;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import javax.swing.JOptionPane;

/**
*
* @author HARMAN
*/
public class NewCompany extends javax.swing.JInternalFrame {

/**
* Creates new form NewCompany
*/
public NewCompany() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/

48

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jLabel4 = new javax.swing.JLabel();
jFormattedTextField1 = new javax.swing.JFormattedTextField();
jLabel5 = new javax.swing.JLabel();
jFormattedTextField2 = new javax.swing.JFormattedTextField();
jButton1 = new javax.swing.JButton();

setMaximumSize(new java.awt.Dimension(1024, 768));
setMinimumSize(new java.awt.Dimension(1024, 768));
setPreferredSize(new java.awt.Dimension(1024, 768));
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("New Company"));
jPanel1.setMaximumSize(new java.awt.Dimension(800, 600));
jPanel1.setMinimumSize(new java.awt.Dimension(800, 600));
jPanel1.setPreferredSize(new java.awt.Dimension(800, 600));
jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel1.setText("Add Company");
jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(349, 79, 148, 55));

49


jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel2.setText("Company name");
jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(135, 165, 104,
36));
jPanel1.add(jTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(419, 175, 271,
-1));

jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jLabel3.setText("Company Address");
jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(135, 240, 135,
22));

jTextArea1.setColumns(20);
jTextArea1.setLineWrap(true);
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);

jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(419, 240,
271, 73));

jLabel4.setText("C S T Number");
jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(135, 410, 148,
23));

jFormattedTextField1.setFormatterFactory(new
javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new
java.text.DecimalFormat("##########"))));
jFormattedTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jFormattedTextField1ActionPerformed(evt);

50

}
});
jPanel1.add(jFormattedTextField1, new org.netbeans.lib.awtextra.AbsoluteConstraints(419,
411, 271, -1));

jLabel5.setText("Contact Number");
jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(135, 346, 119,
22));

jFormattedTextField2.setFormatterFactory(new
javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new
java.text.DecimalFormat("##########"))));
jFormattedTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jFormattedTextField2ActionPerformed(evt);
}
});
jPanel1.add(jFormattedTextField2, new org.netbeans.lib.awtextra.AbsoluteConstraints(419,
347, 271, -1));

jButton1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jButton1.setText("Save");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(349, 516, -1, -1));

getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 30,
-1, -1));

51


setSize(new java.awt.Dimension(1024, 768));
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String path="jdbc:mysql://localhost/"; //path
String place="billing";

try {

Class.forName("com.mysql.jdbc.Driver"); //driver

Connection myconnection=DriverManager.getConnection(path+place,"root","root");

try {
String b="insert into company values(?,?,?,?)";

PreparedStatement mystatement=myconnection.prepareStatement(b);

// mystatement.setInt(1,Integer.parseInt(jTextField2.getText()));
mystatement.setString(1,jTextField1.getText());
mystatement.setString(2,jTextArea1.getText());
mystatement.setLong(3,Integer.parseInt(jFormattedTextField2.getText()));
mystatement.setLong(4,Integer.parseInt(jFormattedTextField1.getText()));

int x=mystatement.executeUpdate();
if(x==1)
{
JOptionPane.showMessageDialog(rootPane,"Added");
}


52


} catch(Exception e) {
JOptionPane.showMessageDialog(rootPane,"problem"+e.getMessage());
}
myconnection.close();
} catch(Exception e) {
JOptionPane.showMessageDialog(rootPane,"problem there");
}
}

private void jFormattedTextField2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jFormattedTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JFormattedTextField jFormattedTextField1;
private javax.swing.JFormattedTextField jFormattedTextField2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextField jTextField1;

53

// End of variables declaration
}






























54

TESTING

During earlier development phases an attempt is made to build software from an abstract concept
to tangible implementation. Software testing is a critical element of software quality assurance
and represents ultimate review of specification; design and coding notion of correctness of the
software just developed and overcome a conflict of interest that occur sheen errors are recovered.
A thorough testing of system before any implementation is mandatory as regards its individual
programs the system as a whole user acceptance of the system etc. This is because implementing
a new system is a major job, which requires a lot of man-hours and other resources, so an error
not detected before implementation may cost a lot. Effective testing early in a process is also
necessary because in some cases a small error not detected and corrected early before installation
may explore into much large problems.

After programming and testing comes the stage of installing the computerized system. It has the
enormous responsibilities of detecting any type of error that may be in the software. Actual
implementation of the system can be begin at this point using either of parallel or direct change
over plan or a blend of the two.

All these factors mean that testing cannot be done on the fly, as, is often done by programmers. It
has to be carefully planned and the plan has to be properly exacted. The testing process focuses
on how testing should proceed for a particular project.

LEVELS OF TESTING

A strategy for software testing integrates software test case designs methods in well-planned
series of steps that results in the successful construction software. An important software testing
planned in advance and conducted systematically. Verification is performed on the output of
each phase but some faults are likely to remain undetected by these methods. These faults will be
eventually reflected in the code. Testing is usually relied on to detect these faults, in addition to
the faults introduced during the coding phase it self. Due to this different levels of testing are
used in the testing process; each level of testing aims to test different aspects of the system.


55

1. Unit Testing:- This is the first level of testing. In this different modules are tested
against the specifications produced during design for the modules. Unit testing is essential for
verification of the code produces during the coding phase, and hence the goal is to test the
internal logic of the modules. The programmers of the module typically do it. Others consider a
module for integration and use only after it has been unit tested satisfactorily. Due to its close
association with coding the coding phase is frequently called coding & unit testing. As the
focus of this testing level is on testing the code structured testing is best suited for this level.

2. Structural Testing:- It is an approach to testing where the tests are derived from
knowledge of the softwares structure and implementation this approach is can analyze the close
and use knowledge about the structure of a component to derive test data. The analysis of the
code can be used to find how many test cases are needed to guarantee that all of the statements in
the program or components are executed at least once during the testing process.



















3. Integration Testing:- Integration Testing is the next level of testing. In this many unit-tested
modules are combined into subsystems, which are then tested. The goal here is to see if the
modules can be integrated properly. Hence the emphasis is on testing interfaces between
modules. This testing activity can be considered testing the design.

Client needs Acceptance testing
Requirements System testing
Design Integration
Testing
Code
Unit Testing

56

4.System and Acceptance Testing:- The next levels are system testing & acceptances testing.
Here the entire software system is tested. The reference document for this purpose is the
requirements document and the goal is to see if the software meets its requirements. This is
essentially a validation exercise, and in many situations it is the only validation activity.
Acceptance testing is sometimes performed with realistic data of the client to determine that the
software is working satisfactorily. Testing here focus on the external behavior of the system; the
internal logic of the program is not emphasized










Tests Derives




Component
Code Test Outputs

Forms are the interface between the user and database system. Testing of forms was extensive
task. All data entry and query formats are designed using forms. Forms were tested to ensure that
they are performing the tasks well they are designed for and correction and modification we
made found to be necessary.

System testing is designed to uncover weakness that was not found in the earlier tests. This
includes forced system failure and its users in the operational environment will implement

Test
Data

57

validation of the total system as it. The total system is tested for recovery and fallback after
various major failures to ensure that data lost during the emergency. All this is done with the old
system still in operation.

After a successful testing of the individual programs and forms the whole system was through a
series of test to ensure the proper working of the system as a whole.
The activities involved in the system testing are:
1.Integration Testing
2.Acceptance Testing

In integration testing the entire system is tested and acceptance testing involves planning and
execution of functional tests, implemented system satisfied its requirements.

Test Plan:

The first steps in the system testing are to prepare a plan that will retest all aspects of the system
in a way that promotes its credibility among potential users. There is a psychology in testing:

1.Programmers usually do a better job in unit testing because they are expected to document and
report on the method and extent of their testing.

2.Programmers are involved when they become aware of the user problems and expectations.










58


SECURITY MECHANISM


Security is one of the important functions of databases managements systems. It guards against
accidental or intentional tampering with data. Databases security is the protection of database
against its accidental or intentional loss, destruction or misuse. The information stored in a
database is very valuable for an organization, so it needs protection from unauthorized accesses
and updates. Database security is the concern of the entire organization as each and every user
uses the databases in one or the other way. Security also includes the strategies that are used to
ensure that the data elements are not accessed, altered or deleted by unauthorized persons.

So my project is fully secured, the any unauthorized persons cant see or access the data.

















59

IMPLEMENTATION AND MAINTENANCE

IMPLEMENTATION
The implementation phase is less creative than system design. It is primarily concerned with user
training, site preparation and file conversion. In this phase I focus on one things viz. to train the
users to use the various tools provides in the software project and to provide them the
information about the use of the software.

Users are the one I can never forget throughout my project. During the final testing user
acceptance is tested, followed by user training. For the new users start working on the computer,
some of the tools are a new concept. It will be required to teach and train them before
implementing software. Each and every user should be clear about what he has to do and how to
do it.

For the user training, help is provided in the software about each and every component. Also,
live help is provided in the Bottom of Main Screen of the software for users ease. More than that
most of the components are self-exploratory from their name.

TRAINING:

The quality or training received by the personnel involved with the system in various capacities
helps or hinders, and may even prevent the successful implementation of an information system.
Those who will be associated with or affected by the system need to be trained. Training the
personnel will be in house. The user of the system will be trained that what the system can be
and what cannot.






60

CONVERSION:

Conversion means the changing from one system to another. The objective is to put the tested
system into operation. The method adopted for conversion of this system is parallel system.
Under this method both the system old and new are operated parallel. This is the safest method.
Error can be prime concern during the conversion this will be done on site. The data will be
entered to the database from the existing registers.

MAINTENANCE

After I have installed the software my next objective is to evaluate and maintain the system.
Maintenance is very important aspect of the system since its objective is to continue to bring the
new system to the standards. Maintenance includes maintaining the hardware as well as
software. Hardware requires maintenance to keep in tune with the system design. Software
requires maintenance because may be the new information is inconsistent with design
specifications, and then arises the need to make changes in the software. Maintenance can be
classified as corrective, adoptive and prefecture.

Corrective maintenance means repairing processing or performance failures or making changes
because of previously uncorrected problems or false assumptions. Adaptive maintenance means
changing the program functions.










61

CONCLUSION

It is designed to offer easy access to all records to provide better maintainability and to enable
the user to make the required modification as and when necessary. This would save tremendous
time energy and effort of doing such tedious tiring and repetitive paperwork.

Execution of this project would enable the user to seek use and manipulation the records
pertaining to every client. This project would, in short, increment the efficiency. In new system,
the user can get the information fastly, easily and efficiently from the software. So in my
software, there is no need of documentation or maintaining the files.

However, there can be some limitations in my system. So further enhancements and
improvements are also required in my software, so that it becomes a part of life of everyone.



















62

BIBLIOGRAPHY



Cool text for designing various buttons and buttons
http://www.cooltext.com

Scribd for getting sample report files and DFDs
http://www.scribd.com

All about Microsoft controls in C#
http://www.msdn.microsoft.com

Smart Draw for drawing diagrams in the report
http://www.smartdraw.com

You might also like