Académique Documents
Professionnel Documents
Culture Documents
Chess game
Project Done By:
Name: U.Chetan P Padiyar
Roll no:10
Certificate
Acknowledgement
Files generated
Bibliography
ACKNOWLEDGEMENT
immense knowledge that she shared with us have proved highly beneficial
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:
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.
Information Gathering
Feasibility study
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
Search facility
Testing of knowledge
HARDWARE CONFIGURATION
RAM : 1GB
SOFTWARE CONFIGURATION
Operating System : Windows NT,
Windows 7
Language : Java
Database : MySQL
SYSTEM REQUIREMENTS
2.Results
Table structures :
1. Quiz
2. Results
SOFTWARE INTERFACE
MAIN PAGE
KNOWLEDGE HUB
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
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);
}
int index=1;
int max=0;
int result=0;
char [] answers;
String ans;
public que()
{
{
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);
}}
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;
}
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);
}
getQues();
index=index+1;
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);
}
buttonGroup1.clearSelection();
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,""+e);
}
RESULT
}
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();
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); } }
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