Sei sulla pagina 1di 13

CONTENTS

1. INTRODUCTION-----------------------------------1
2. OBJECTIVE OF PROJECT------------------------2
3. THEORETICAL BACKGROUND---------------3
4. PROBLEM ANALYSIS----------------------------7
5. SYSTEM IMPLEMENTATIONS----------------8
6. SYSTEM DESIGN----------------------------------9
7. USER MANNUAL----------------------------------21
8. REFRENCES-----------------------------------------22
SYSTEM DESIGN AND DEVELOPMENT

Database Design:
Creating a database in mysql and using it was very important and useful
task. By creating database in mysql we can simply link it with Netbeans
and perform our operations. Hence creating a database and managing it
properly is a very important task in creation of this or any other
software. This project only uses single database named-Project which
further contains two tables:
1. PeriodicTable
2. Details
Table Content and Specifications:

1. Considering our first table ‘PeriodicTable’ it has the following


description followed by the content contained in it.

Here is the screenshot of MySql Client showing the description of the table
‘PeriodicTable’.
Coming to the content of the above table this is as follows;

2. Coming to our next table named ‘Details’ its content and description is as
follows;
The content contained in Details is;

The above pictures are direct screenshot from the MYSQL client. Nothing is
changed in showing these images. This concludes the work done in MYSQL in the
creation of this project. This included a database and two tables: one showing basic
information about first 30 elements of the periodic table and the other giving some
detailed information about the same. Since the work of adding information of each
and every element is very cumbersome that is why I have only included 30
elements but the user can insert the remaining by their own wish.

Now, the Database creation and management is done now we will move forward to
the creation of project in JAVA Netbeans IDE.
GUI (Graphic User Interface) Design:
While creating software it is very important to take care that it interacts with the
user smoothly and gives the user powers to fully operate it. For such good interface
we have used NETBEANS IDE to create our GUI which will take the inputs of the
user and work accordingly.

In NetBeans I have made many different forms, each having a specific purpose.
Below are the forms created for this project:

1. Main_Page

2. Credits

3. About

4. Category

5. Details

6. Sban (Search by Atomic Number)

7. Sbas (Search by Atomic Symbol)

8. Table

This is the list of forms present in the project provided in the CD-ROM. Now, we
will look into details of each form and will try to understand the coding behind
each button present of a particular form.

Details of Each Form:

1. Starting with the Main_Page form, it will be the first page of the project which
contains links to all other pages in the project. It contains four different buttons.
Three of them will take the user to other forms and one is the ‘EXIT’ button to
terminate the application. The buttons contained in the form have simple coding
scheme as they only direct the user to another form. The content of the form is as
follows:

First is the screenshot of how form looks.


A. Coding of PERIODIC TABLE Button;

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

this.dispose();

new Table().setVisible(true); }

B. Coding of CREDITS Button;

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

this.dispose();

new Credits().setVisible(true); }

C. Coding of ABOUT Button;

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

this.dispose();

new About().setVisible(true); }
D. Coding of EXIT Button;

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

JOptionPane.showMessageDialog(this,"THANKS FOR REVIEWING OUR


APPLICATION!!");

System.exit(0); }

2. Now, considering the Credits form is has following content and it will open
when CREDITS button is pressed in Main_Page form.

When Back button is clicked it will again take the user to our Main form.

Coding of Back Button;

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

this.dispose();

new MAIN_PAGE().setVisible(true);

}
3. The About form will open up when the ABOUT button is pressed in the Main
form and will look something like this,

Here also the Back button will take the user to the Main _Page form.

Coding for Back Button;

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

this.dispose();

new MAIN_PAGE().setVisible(true);

4. When the user clicks the PERIODICTABLE button Table form will
popup where the user can see the names and details of the elements
present in the periodic table. This form also provides the user to search
elements on the basis of some common properties.
The table form looks something like this,
A. Coding of Back Button;
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
this.dispose();
new MAIN_PAGE().setVisible(true);
}
B. Coding of Category Button;
This will open up a form through which user can search the elements in
the periodic table which belong to same category as the input provided
by the user. This form looks something like this,

These are the categories. User can select one and the elements belonging
to that category will be listed.
C. Coding of Show Button;
This is the most important button in the whole project. This will list the
entire element’s data in the table provided below. This button also
includes the connectivity between MySql Client and NetBeans.
Before this button some classes are imported in NetBeans.
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
Connection conn=null;
DefaultTableModel tm=(DefaultTableModel) jTable2.getModel();
tm.setRowCount(0);
try{
Class.forName("java.sql.DriverManager");
System.out.println("Drivers Loades");
conn=(Connection) DriverManager.getConnection
("jdbc:mysql://localhost:3306/Project","root","Rohanraj123");
System.out.println ("Connection Established!!");
Statement Stmt= (Statement) conn.createStatement();
String Q="Select*from periodictable";
ResultSet rs= Stmt.executeQuery(Q);
while (rs.next()){
String Name=rs.getString("atm_name");
int atmn=rs.getInt("atm_no");
int atmmass=rs.getInt("atm_mass");
String symbol=rs.getString("Symbol");
Object r []={Name,atmn,symbol,atmmass};
tm.addRow(r);
}
}
catch (Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
}
}
This concludes the coding of our project in NetBeans. The above coding
is just copied from NetBeans and pasted. Nothing extra has been added
or deleted from the same. This whole work including the database in
MySql and the project of NetBeans Has been provide in the CD-ROM.
User can simply install that stuff in his computer and can experience the
project.
PROJECT FILE

“THE PERIODIC
TABLE”

Submitted By: Submitted To:


Rohan Raj Kansal Alka Bhatia
XII Science (Non-Medical) (Informatics Practices)
Board Roll Number: 2761334

Potrebbero piacerti anche