Vous êtes sur la page 1sur 27

PROJECT FILE ON

Chess game
Project Done By:
Name: U.Chetan P Padiyar
Roll no:10

Name: Kaushik Pattnaik0020


Roll no:17

Name: V.Anurag Kashyap


Roll no:06

Name: K. Naren Kumar


Roll no:22
TABLE OF CONTENTS

 Certificate

 Acknowledgement

 Working description of project

 Files generated

 Coding & outputs

 Bibliography
ACKNOWLEDGEMENT

It would be our utmost pleasure to express our sincere thanks to our

Computer Science Teacher “Mrs.Moumita choudhury” in providing a

helping hand in this project. Her unflagging patience, creativity and

immense knowledge that she shared with us have proved highly beneficial

to us and have made our Project possible and successful.

I would also like to express my special thanks to our Principal Madam

“Mrs Vasantha S.Raman” for providing golden opportunity and support

for the completion of our project.

Name of the Student:


1. U.Chetan P Padiyar
2. Kaushik Pattnaik
3. V.Anurag Kashyap
4. K. Naren Kumar
CERTIFICATE

This is to certify that Miss/Master.............................................of class

XII Roll no………………...has completed this project titled “Indian

Scientists” under the guidance of the Computer Tr. “………….

……………….”& this project may be considered as the part of the

practical exam of A.I.S.S.C.E-2017 conducted by CBSE.

Principal:
Name of School:
School Stamp:

FILES GENERATED
 Main.java
WORKING DESCRIPTION OF PROJECT
This Project is based on chess game . Its main objective is to give some knowledge
on the scientists and know about them by taking a quiz. We have used Java Net
Beans 8.0.1 and MySQL to program the project.

INTRODUCTION

SYSTEM ANALYSIS

EXISTING SYSTEM:

System Analysis is a detailed study of the various operations performed by a


system and their relationships within and outside the system. Here the key question
is- what all problems exist in the present system? What must be done to solve the
problem? Analysis begins when a user or manager begins a study of the program
using existing system.

During analysis, data collected on the various files, decision points and
transactions are handled by the present system. The commonly used tools in the
system are Data Flow Diagram, interviews, etc. Training, experience and common
sense are required for collection of relevant information needed to develop the
system. The success of the system depends largely on how clearly the problem is
defined, thoroughly investigated and properly carried out through the choice of
solution. A good analysis model should provide not only the mechanisms of problem
understanding but also the frame work of the solution. Thus it should be studied
thoroughly by collecting data about the system. Then the proposed system should be
analyzed thoroughly in accordance with the needs.

System analysis can be categorized into four parts.

 System planning and initial investigation

 Information Gathering

 Applying analysis tools for structured analysis

 Feasibility study

 Cost/ Benefit analysis.

In the current system we have to refer to many books to know about our
scientists. And many feel that the books are boring and they don’t read it.

PROPOSED SYSTEM

In our proposed system we have the provision for giving details to


students about our Indian scientists and testing their knowledge. Another
advantage of the system is students can test their knowledge about the information
given in the knowledge hub. By our system students can feel interesting. After the
quiz students can view their results and can know how much they came to know
about Indian scientists.
Our proposed system has several advantages
 User friendly interface

 Fast access to database

 Search facility

 Look and Feel Environment

 Testing of knowledge

HARDWARE CONFIGURATION

Processor : Pentium IV 630MHz

RAM : 1GB

Hard Disk : 260 GB

Monitor : 15” Color monitor

Key Board : 122 Keys

SOFTWARE CONFIGURATION
Operating System : Windows NT,

Windows 7

Language : Java

IDE : Net beans 6.5.1

Database : MySQL

SYSTEM REQUIREMENTS

This management system can be run in windows 98, Windows2000,


Windows XP and Windows NT, supported for other platform such as Apple,
Macintosh and UNIX.

The system must be running Windows 7, Windows XP or Windows NT4.0


operating system and must meet the following hardware requirements.

 For Windows 95 based computers , a 486 / 66 MHz or


higher processor with 8MB
 For Windows 98 based computers , a 500/88MHz or
higher processor with 32 Mb of RAM
 For Windows NT based computers , a 488 / 66 MHz or
higher processor with 16 MB of RAM
 For Windows 200 based computers , a 700/850 MHz or
higher processor with 512 MB of Ram

DATA FLOW DIAGRAM

User System Report

View Questions Quiz


View Score
Result

Database and table structure

Database Name : quizdb

Tables used : 1.Quiz

2.Results

Table structures :

1. Quiz

Field Type Null Key Default Extra


SNo int(11) YES NULL
Question Varchar(200) YES NULL
a Varchar(100) YES NULL
b Varchar(100) YES NULL
c Varchar(100) YES NULL
d Varchar(100) YES NULL
result Varchar(1) YES NULL

2. Results

Field Type Null Key Default Extra


Name Varchar(30) YES NULL
Result Int(11) YES NULL

SOFTWARE INTERFACE

MAIN PAGE

Coding for knowledge hub button:

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


scientists frame2=new scientists();
frame2.setVisible(true);
this.setVisible(false);
}

Coding for quiz button:

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


quiz frame2=new quiz();
frame2.setVisible(true);
this.setVisible(false);
}

Coding for exit button:

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


System.exit(0);
}

KNOWLEDGE HUB

Coding for Homi J Bhabha button:


private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
scientists frame1=new scientists();
Homi frame2=new Homi();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

Coding for C V Raman button:

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


scientists frame1=new scientists();
Raman frame2=new Raman();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

Coding for Ramanujan button:

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


scientists frame1=new scientists();
Ramanujan frame2=new Ramanujan();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

Coding for A P J Abdul Kalam button:

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


scientists frame1=new scientists();
kalam frame2=new kalam();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}
Coding for M Visvesvaraya button:

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


scientists frame1=new scientists();
Mvisvesvaraya frame2=new Mvisvesvaraya();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}
Coding for back button:

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


scientists frame1=new scientists();
main frame2=new main();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}
HOMI J BHABHA

Coding for back button:


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Homi frame1=new Homi();
scientists frame2=new scientists();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

C V RAMAN
Coding for back button:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Raman frame1=new Raman();
scientists frame2=new scientists();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

SRINIVASA RAMANUJAN
Coding for back button:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Ramanujan frame1=new Ramanujan();
scientists frame2=new scientists();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

A P J ABDUL KALAM

Coding for back button:


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
kalam frame1=new kalam();
scientists frame2=new scientists();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}
M VISVESVARAYA

Coding for back button:


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
Mvisvesvaraya frame1=new Mvisvesvaraya();
scientists frame2=new scientists();
frame1.setVisible(false);
frame2.setVisible(true);
this.setVisible(false);
}

QUIZ PAGE
Coding for start quiz button:
private void startquizActionPerformed(java.awt.event.ActionEvent evt) {
name=txtname.getText();
que frame2=new que(name);
try
{
Class.forName("java.sql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root","dav");
Statement stmt=con.createStatement();
String sql="insert into results(name) values('"+name+"');";
stmt.executeUpdate(sql);
stmt.close();
con.close();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);

}
frame2.setVisible(true);
this.setVisible(false);
}

Coding for back button:

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


main frame2=new main();
frame2.setVisible(true);
this.setVisible(false);
}
QUIZ QUESTION

Coding in public class:


public class que extends javax.swing.JFrame {
String ID;

int index=1;
int max=0;
int result=0;
char [] answers;
String ans;
public que()
{

Coding in init components:

{
initComponents();
}

public que(String n) {

initComponents();
back.setIcon(new ImageIcon("pics\\que.jpg"));
ID=n;
lblid.setText(ID);
try
{
Class.forName("java.sql.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root", "dav");
Statement stmt=conn.createStatement();
String sql="select max(SNo)from quiz;";
ResultSet rs=stmt.executeQuery(sql);
rs.next();
max=rs.getInt(1);
answers=new char[max];
for(int i=0; i<max; i++)
answers[i]='e';
getQues();
index=index+1;
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);
}
}
private void getQues()
{
try
{

Class.forName("java.sql.Driver");
Connection conn=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root", "dav");
Statement stmt=conn.createStatement();
String sql="select * from quiz where SNo="+index+";";
ResultSet rs=stmt.executeQuery(sql);
rs.next();
lblquestion.setText("\nQ"+index+"."+rs.getString(2));
a.setText(rs.getString(3));
b.setText(rs.getString(4));
c.setText(rs.getString(5));
d.setText(rs.getString(6));
a.setSelected(answers[index-1]=='a');
b.setSelected(answers[index-1]=='b');
c.setSelected(answers[index-1]=='c');
d.setSelected(answers[index-1]=='d');
e.setSelected(answers[index-1]=='d');
e.setVisible(false);
rs.close();
stmt.close();
conn.close();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);
}}

Coding for lock my answer button:


private void LockBTNActionPerformed(java.awt.event.ActionEvent evt) {
try
{
Class.forName("java.sql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root","dav");
Statement stmt=con.createStatement();

String sql="select * from quiz where SNo="+(index-1)+" ;";


ResultSet rs=stmt.executeQuery(sql);
rs.next();
if(rs.getInt(1)==10)
{
getResultBTN.setVisible(true);
nextBTN.setVisible(false);
}

if(a.isSelected())
{
ans="a";
}
else if(b.isSelected())
{
ans="b";
}
else if(c.isSelected())
{
ans="c";
}
else if(d.isSelected())
{
ans="d";
}
if(ans.equals(rs.getString(7)))
{
result=result+1;
}

sql="update results set result="+result+" where name='"+ID+"';";


stmt.executeUpdate(sql);

rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);}}
private void getResultBTNActionPerformed(java.awt.event.ActionEvent evt) {
try {
Result t=new Result(ID);
t.setVisible(true);
this.setVisible(false)
}
catch(Exception e){
JOptionPane.showMessageDialog(null,""+e);
}

Coding for next button:


private void nextBTNActionPerformed(java.awt.event.ActionEvent evt) {
try
{
Class.forName("java.sql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root","dav");
Statement stmt=con.createStatement();
String sql="select max(SNo) from quiz;";
ResultSet rs=stmt.executeQuery(sql);
rs.next();
max=rs.getInt(1);
answers=new char[max];
for(int i=0;i<max;i++)
answers[i]='e';

getQues();
index=index+1;

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

}
buttonGroup1.clearSelection();

Coding for get result button:

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


try
{
Result t=new Result(ID);
t.setVisible(true);
this.setVisible(false);

}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);
}

Coding for exit button:


private void exitActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}

RESULT

Coding in init components:


public Result()
{
initComponents();

}
public Result(String name) {
initComponents();

Name=name;
try
{
Class.forName("java.sql.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/quizdb","root","dav");
Statement stmt=con.createStatement();

String sql="select * from results where name='"+Name+"';";

ResultSet rs=stmt.executeQuery(sql);
rs.next();
Integer s=rs.getInt(2);
result.setText(""+s);
if(s>=10)
{
grade.setText("Outstanding");}
else if(s>=5) {
grade.setText("Good");}

else
{
grade.setText("Not satisfactory");
}}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e); } }

Coding for exit button:


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);}
CONCLUSION
Our project is only a humble venture to satisfy the needs in an Institution. Several
user friendly coding have also adopted. This package shall prove to be a powerful
package in satisfying all the requirements of the organization.
All screens are informative and interactive in such a way that the user can fulfill
his requirements .

The objective of software planning is to provide a frame work that enables the
manger to make reasonable estimates made within a limited time frame at the
beginning of the software project and should be updated regularly as the project
progresses. Last but not least it is not the work that played the ways to success but
ALMIGHTY

BIBLIOGRAPHY

1) http://www.javanetbeans.org
2) Database Programming with JDBC and Java by O'Reilly
3) Head First Java 2nd Edition
4) http://www.jdbc-tutorial.com/
5) Java and Software Design Concepts by APress

Vous aimerez peut-être aussi