You are on page 1of 35

PROJECT ON:-

SUBMITTED TO:
Mr. VIRENDRA SHARMA
SENIOR TEACHER
COMPUTER DEPARTMENT

SUBMITTED BY:-

Abhishek Sharma
CLASS XII-A
ROLL No. :-

This is to certify that this project on the ONLINE


MOBILE SHOP done by master
OM BOHRA
of Class XII-G is truly genuine and has been
Done under my supervision and guidance and my
truth worthy members
Of Computer Department.

Mr.VIRENDRA SHARMA
(COMPUTER DEPT).
BIRLA SCHOOL PILANI,

I would like to thank my teacher Mr.


VIRENDRA SHARMA for giving me such a nice
project on such an exciting topic ONLINE
MOBILE SHOP

to utilize my Diwali holidays and thank him


for providing me broadband to get the
matter and ones again thanks to sir and my
friend .

Signature of teacher:-

FRONT END: BRANDS AVAILABLE


WINDOW:-

CODING:private void NMouseClicked(java.awt.event.MouseEventevt) {


NOKIA COMPANY = new NOKIA();
COMPANY.setVisible(true);
this.setVisible(false);// TODO add your handling code here:
}

private void
FActionPerformed(java.awt.event.ActionEventevt) {
FEATURE COMPANY = new FEATURE();
COMPANY.setVisible(true);
this.setVisible(false);
// TODO add your handling code here:
}

private void SMouseClicked(java.awt.event.MouseEventevt) {


SAMSUNG COMPANY = new SAMSUNG();
COMPANY.setVisible(true);
this.setVisible(false);// TODO add your handling code here:
}
private void AMouseClicked(java.awt.event.MouseEventevt) {
APPLE COMPANY = new APPLE();
COMPANY.setVisible(true);
this.setVisible(false);// TODO add your handling code here:
}

FEATURES WINDOW:-

CODING:private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY FEATURE = new COMPANY();
FEATURE.setVisible(true);
this.setVisible(false);
// TODO add your handling code here:
}
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY FEATURE = new COMPANY();
FEATURE.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

NOKIA WINDOW:-

CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;

private void
jButton3ActionPerformed(java.awt.event.ActionEventevt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("5000");
else if(srno==2)
tf2.setText("10000");
else if(srno==3)
tf2.setText("15000");
else if(srno==4)
tf2.setText("7000");

this.setVisible(false);
d1.setVisible(true); // TODO add your handling code here:
}

private void
jButton1ActionPerformed(java.awt.event.ActionEventevt) {
COMPANY NOKIA = new COMPANY();
NOKIA.setVisible(true);
this.setVisible(false);
here:
}

// TODO add your handling code

private void
jButton2ActionPerformed(java.awt.event.ActionEventevt) {
PREVIEW NOKIA= new PREVIEW();
NOKIA.setVisible(true);
this.setVisible(false);
here:

// TODO add your handling code

private void
jButton5ActionPerformed(java.awt.event.ActionEventevt) {
this.setVisible(true);
d1.dispose();

// TODO add your handling code here:

private void formFocusGained(java.awt.event.FocusEventevt)


{
// TODO add your handling code here:
}

private void
formWindowActivated(java.awt.event.WindowEventevt) {
DefaultTableModel
model=(DefaultTableModel)nokia.getModel();

try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localhost/mo
bileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM nokia;";
ResultSetrs=stmt.executeQuery(query);

while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}

// TODO add your handling code here:

private void
jButton4ActionPerformed(java.awt.event.ActionEventevt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY NOKIA = new COMPANY();
NOKIA.setVisible(true);
this.setVisible(false);
d1.dispose();

// TODO add your handling code here:}

SAMSUNG WINDOW:-

CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
PREVIEW SAMSUNG = new PREVIEW();
SAMSUNG.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);

d1.dispose();
here:

// TODO add your handling code

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("5000");
else if(srno==2)
tf2.setText("4000");
else if(srno==3)
tf2.setText("10000");
else if(srno==4)
tf2.setText("10000");

this.setVisible(false);
d1.setVisible(true);
// TODO add your handling code here:
}

private void
formWindowActivated(java.awt.event.WindowEventevt
){
DefaultTableModel
model=(DefaultTableModel)samsung.getModel();
try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localh
ost/mobileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM samsung;";
ResultSetrs=stmt.executeQuery(query);

while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});
}
rs.close();
stmt.close();

con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}

// TODO add your handling code here:

private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);

APPLE WINDOW:-

CODING:importjava.sql.*;
importjavax.swing.JOptionPane;
importjavax.swing.table.DefaultTableModel;

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
PREVIEW APPLE= new PREVIEW();
APPLE.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY APPLE = new COMPANY();
APPLE.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);
d1.dispose();

// TODO add your handling code here:


}

private void
formWindowActivated(java.awt.event.WindowEventevt
){
DefaultTableModel
model=(DefaultTableModel)apple.getModel();
try{
Class.forName("java.sql.Driver");
Connection
con=DriverManager.getConnection("jdbc:mysql://localh
ost/mobileshop","root","root");
Statement stmt=con.createStatement();
String query="SELECT * FROM apple;";
ResultSetrs=stmt.executeQuery(query);

while(rs.next()){
String srno=rs.getString("srno");
String modelno=rs.getString("modelno");
String price=rs.getString("price");
model.addRow(new Object[] {srno,modelno,price});

}
rs.close();
stmt.close();
con.close();
}
catch(Exception e){
JOptionPane.showMessageDialog(null,"eroor in
connectivity");
}

// TODO add your handling code here:

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt) {
intsrno=Integer.parseInt(tf1.getText());
if(srno==1)
tf2.setText("10000");
else if(srno==2)
tf2.setText("15000");
else if(srno==3)
tf2.setText("25000");
else if(srno==4)

tf2.setText("30000");

this.setVisible(false);
d1.setVisible(true);
code here:

// TODO add your handling

private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY APPLE = new COMPANY();
APPLE.setVisible(true);
this.setVisible(false);

PREVIEW WINDOW:-

CODING:importjavax.swing.JOptionPane;
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt) {

COMPANY PREVIEW = new COMPANY();


PREVIEW.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt) {
COMPANY PREVIEW = new COMPANY();
PREVIEW.setVisible(true);
this.setVisible(false);
code here:

// TODO add your handling

private void
jButton5ActionPerformed(java.awt.event.ActionEvente
vt) {
this.setVisible(true);
d1.dispose();
here:
}

// TODO add your handling code

private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt) {
String s=tf2.getText();
JOptionPane.showMessageDialog(null,"you are
charged"+s+"and your mobile will be delivered at your
home");
COMPANY SAMSUNG = new COMPANY();
SAMSUNG.setVisible(true);
this.setVisible(false);
d1.dispose();
here:

// TODO add your handling code

private void
jLabel6MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("10000");
// TODO add your handling code here:
}

private void
jLabel8MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("7000");
code here:

// TODO add your handling

private void
jLabel3MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("30000");
code here:

// TODO add your handling

private void
jLabel5MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("25000");
code here:

// TODO add your handling

private void
jLabel2MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("5000");
code here:

// TODO add your handling

private void
jLabel1MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);
tf2.setText("4000");
code here:

// TODO add your handling

private void
jLabel4MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);
d1.setVisible(true);

tf2.setText("15000");
code here:

// TODO add your handling

private void
jLabel9MouseClicked(java.awt.event.MouseEventevt) {
this.setVisible(false);

DIALOG BOX FOR


PAYMENT:-

BACK END: DATABASE NAME = MOBILESHOP


TABLES:-

APPLE:Srn
o.
1

Model no.

price

Ipad

15000

iphone

20000

Itop

25000

Me

30000

CODING:CREATE TABLE APPLE


(SRNO INT(5) UNIQUE,
MODELNO VARCHAR(10),
PRICE INT(10));

INSERT INTO APPLE


VALUES(1,ipad,15000);
INSERT INTO APPLE

Values(2,iphone,20000);
INSERT INTO APPLE
Values(3,itop,25000);
INSERT INTO APPLE
Values(4,me,30000);

NOKIA:Srno.
1
2
3
4

Model no.
C201
N95
E97
N70

CODING:create table nokia


(SRNO INT(5) UNIQUE,
MODELNO VARCHAR(10),
PRICE INT(10));

price
5000
1000
15000
7000

INSERT INTO nokia


VALUES(1,c201,5000);
INSERT INTO nokia
Values(2,n95,1000);
INSERT INTO nokia
Values(3,e97,15000);
INSERT INTO nokia
Values(4,n70,7000);

SAMSUNG:Srno.
1
2
3
4

Model no.
guru
S45
S50
galaxy

CODING:create table samsung


(SRNO INT(5) UNIQUE,
MODELNO VARCHAR(10),
PRICE INT(10));

INSERT INTO samsung


VALUES(1,guru,5000);
INSERT INTO samsung
Values(2,s45,4000);
INSERT INTO samsung
Values(3,s50,10000);

price
5000
4000
10000
10000

INSERT INTO samsung


Values(4,galaxy,10000);

BIBLIOGRAPHY
I.P. SUMITA ARORA (class XII)
MOVE FAST WITH I.P. (class XII)

EVERGREEN I.P. (class XII)


TOGETHER WITH I.P. (class XII)

You might also like