Sie sind auf Seite 1von 63

CHAPTER - 1

INTRODUCTION

Chapter: 1 INTRODUCTION
The project is based on Puzzle Game. This is a Core Java (front end) and MySQL (back end) based application. The game will provide joy to the player playing it and its a great time pass as well.

Some Attributes of this puzzle game are:

1. Puzzle Word: Game provides a jumbled word, which the player has to guess.

2. Player: Any user can become a player without any registration.

3. Playing the Game: User can easily guess the word by trying various combinations. .

4. Quality of Output: User can increase his/her IQ level and off course can get vivified.

There are no second chances in this game. The game will provide a word whose letters will be arranged randomly, the player has to think of all the combinations and have to guess the right one. If the player guessed the right word, it will be correct and next word will appear (means the next riddle) and if he/she guesses a wrong combination of the letters then it will be incorrect and again a new word will be shown on the screen. In this way, the game doesnt provides a second chance

PREFACE

Computers are revolutionizing every aspect of our life. The offices where we work, the stores where we shop, the schools and the colleges we attend, the banks that handle our money, the devices we use in our home and in every area of our life are being radically altered by computers.

Even new inventions & discovery is somehow related to computers. Computers have changed mans life. Besides home shopping or maintaining records even today computer chips are being implanted in humans body that identifies you uniquely.

Computers usage is growing by leaps and bounds in business, industry, government, colleges, schools and other institutes .In the modern era of science and technology as a powerful nation, India is still lagging behind due to dis-advancement in computer technologies. This problem can be overcome only when the youth of India of the present generation give full co-operation in rising India as a powerful nation by learning more and more computer.

In ever widening modern world, the present system of education is facing new challenges. It is well known fact that today is the age of computers. The major achievement of science and technology .Now-a-days everyone is realizing the importance of computer which of modern age in fifth generation of computers.

This course is aimed at making students a complete and self-reliant programmer. We are given all the needed Knowledge about the structure and the basis of computers at first stage & then study of various business requirements is involved in the last semester as project work. Thus candidate is exposed to real time environment. The students are also given proper knowledge of various computer languages so as to do programming to change any manual atmosphere to a computerized system.

10

They have to work in any organization and have to change a manually working system in a computerized system so that they are able to understand the problems arising out of such an environment.

11

CHAPTER - 2

REQUIREMENT SPECIFICATIONS

12

Chapter: 2 REQUIREMENT SPECIFICATIONS


At this level project manager or administrator must acquire the requirements of customer through which a manager can fulfill the requirements according to the customer needs. All requirements must be done according to client look and feel. The manager must possess the answer of the following questions: What is being done? How is it being done? How frequent does it occur? How great is the volume of transaction or decisions? How well is the task being performed? Does a problem exist? If a problem exists, how serious is it? If a problem exists, what is the underlying cause?

Requirement analysis relies on fact-finding techniques. These include: Interview Questionnaires Record inspection On-site observation

13

CHAPTER - 3

PROPOSED SYSTEM

14

Chapter: 3
PROPOSED SYSTEM

The Game (Guess the Word) is an easy to maintain, ready to run, scalable, affordable and reliable cost saving tool from Software Associates suited for small, medium, and large projects. Features and Benefits:

computer knowledge required

The proposed system can be used even by the nave users and it does not require any educational level, experience, and technical expertise in computer field but it will be of good use if the user has the good knowledge of how to operate a computer.

15

ADVANTAGES OF PROPOSED SYSTEM User-friendly package because it is very much according to the users requirements. It would take less time to get familiar with package.

Graphical user interface (GUI) is provided to the user. For security purpose authentication is provided, so that unauthorized user cant use manipulate the site.

Suitable help/error message for better user interface i.e. if user makes some mistake, the error message will be generated.

For security purpose, if the user wants to change the password, he/she can do this very easily.

The web-site is an easy to use application that can be helpful for day-to-day needs.

The users can give their valuable suggestions & feedbacks betterment of the site.

Not effected by environmental factors.

16

CHAPTER - 4

FEASIBILITY STUDY

17

Chapter: 4 FEASIBILITY STUDY


A feasibility study is a short, focused study, which aims to answer a number of questions: contribute to the overall objectives of the organizations? current technology and within given cost and schedule constrains? Can the system be integrated with systems which are already in place?

TECHNICAL FEASIBILITY:

ource constraints (i.e., budget, schedule)?

OPERATIONAL FEASIBILITY: Define the urgency of the problem and the acceptability of any solution; if the system is developed, will it be used? Includes people-oriented and social issues: internal issues, such as manpower problems, labor objections, manager resistance, organizational conflicts and policies; also external issues, including social acceptability, legal aspects and government regulations.

FINANCIAL FEASIBILITY:

crue from the new system worth the costs? ll result from the system, Including tangible and intangible ones? e the development and operational costs?

18

CHAPTER - 5

SOFTWARE / HARDWARE REQUIREMENTS

19

Chapter: 5 SOFTWARE/HARDWARE REQUIREMENTS


SOFTWARE Software required to make working of product is:-

1. Operating System: Windows XP/vista/7 or later version, Linux OS which supports networking. 2. JAVA development tool kit

HARDWARE Hardware requirements for Insurance on internet will be same for both the parties which are follows:

Processor: - Pentium I or above. RAM: HD: NIC: 128 MB or above. 20 GB or above. For each party

20

CHAPTER - 6

SYSTEM DESIGN

21

Chapter: 6 SYSTEM DESIGN

DFD (DATA FLOW DIAGRAM) Data flow diagram is graphical tool used to describe and analyze the movement of data through system manual or automated- including the process, stores of data and delays in the system. Data flow diagrams are the central tool and the basis from which other components are developed. The transformation of data from input to output through process may be described logically and independently of the physical components associated with the system. They are termed logical data flow diagrams. COMPONENTS OF DFDS

DATA FLOW: Data move in a specific direction from an origin to a destination in a form of a document letter, telephone call or virtually any medium.

PROCESS: People, procedures or devices that are used to produce data. The physical component is not identified.

SOURCE OR DESTINATION OF DATA: External sources or destinations of data which may be people, programs, organizations or other entities, interact with the system but are outside its boundary. The term source and sink are interchangeable with origin and destination.

DATA STORE: Here data are stored or referenced by a process in the system. The data store may represent computerized or non-computerized devices.

22

DFD:

PLAYER PUZZLE

GUESS THE WORD

INCORRECT CORRECT

NEW WORD

Data Flow Diagram

23

CHAPTER -7

ENTITY RELATIONSHIP DIAGRAM

24

Chapter: 7 ENTITY RELATIONSHIP DIAGRAM


The Entity Relationship Diagram (ERD) is the graphical notation of the relationship between data object and attributes. The ERD was originally proposed by Peter Chen for the design of relational database systems and has been extended by others. Primary components identified for ERD are: Data objects Attributes Relationship Various type indicators.

PURPOSE OF ERD The primary purpose of the ERD is to represent data objects and their relationship. The (min,max) notation

25

WORD

INCORRECT

GUESS CORRECT

PLAYER

E-R Diagram

26

CHAPTER 8

CODING

27

Chapter: 8 CODING
Game.java: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ packageguesstheword; importjava.sql.ResultSet; importjava.util.ArrayList; importjavax.swing.JOptionPane; importsun.audio.*; import java.io.*; importjava.util.logging.Level; importjava.util.logging.Logger;

/** * * @author AayushAggarwal */ public class Game extends javax.swing.JFrame {

/** * Creates new form Game */ public Game() { initComponents(); setPuzzleword(); try { 28

new tester().music(); } catch(Exception c) {

} }

voidsetPuzzleword() { intrandosr = (int) (Math.random() * 9); String query = "select scrambled from game where sr=?"; ArrayList al = new ArrayList(); al.add(randosr); try { ResultSetrs = SqlUtil.getData(query, al); if (rs.next()) { jTextField2.setText(rs.getString("scrambled")); }

} catch (Exception e) { } }

/** * 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")

29

//

<editor-fold

defaultstate="collapsed"

desc="Generated

Code">//GEN-

BEGIN:initComponents private void initComponents() {

jButton7 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jTextField2 = new javax.swing.JTextField(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton();

jButton7.setText("Next>");

jButton6.setText("Stop!"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton6ActionPerformed(evt); } });

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guesstheword/words.jpg"))); // NOI18N jLabel1.setText("jLabel1"); 30

jLabel2.setText("Puzzle Word : ");

jLabel3.setText("Guess Word :");

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

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

jButton2.setText("New Word"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton2ActionPerformed(evt); } });

jButton3.setText("Exit"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton3ActionPerformed(evt); } }); 31

jTextField2.setBackground(new java.awt.Color(204, 204, 204)); jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jTextField2ActionPerformed(evt); } });

jButton4.setText("Debug Game!!"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton4ActionPerformed(evt); } });

jButton5.setText(">>"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton5ActionPerformed(evt); } });

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() 32

.addGap(130, 130, 130) .addComponent(jButton1) .addGap(175, 175, 175) .addComponent(jButton2) .addGap(0, 55, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton4))) .addGap(31, 31, 31) .addComponent(jButton5)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(40, 40, 40)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 90,

javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140,

javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(40, 40, 40)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jTextField1) .addComponent(jTextField2, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton3) .addGap(107, 107, 107)) javax.swing.GroupLayout.DEFAULT_SIZE, 160,

33

.addComponent(jLabel1, Short.MAX_VALUE) ); layout.setVerticalGroup(

javax.swing.GroupLayout.PREFERRED_SIZE,

0,

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(320, 320, 320)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20,

javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel3)) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(16, 16, 16)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton2) .addComponent(jButton5)))) .addGroup(layout.createSequentialGroup()

34

.addComponent(jLabel1,

javax.swing.GroupLayout.PREFERRED_SIZE,

290,

javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton3)) );

pack(); }// </editor-fold>//GEN-END:initComponents

private

void

jButton1ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton1ActionPerformed // TODO add your handling code here:

String scram = jTextField2.getText(); String ori = jTextField1.getText();

try {

String query = "select * from game where scrambled=? and correct=?"; ArrayList al = new ArrayList(); al.add(scram); al.add(ori); ResultSetrs = SqlUtil.getData(query, al); if (rs.next()) {

JOptionPane.showMessageDialog(this, "Correct!!!"); setPuzzleword(); jTextField1.setText(""); } else { 35

JOptionPane.showMessageDialog(this, "Incorrect!! Try Again!!"); } } catch (Exception ec) { ec.printStackTrace(); } }//GEN-LAST:event_jButton1ActionPerformed

private

void

jButton2ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton2ActionPerformed setPuzzleword(); jTextField1.setText(""); }//GEN-LAST:event_jButton2ActionPerformed

private

void

jButton3ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton3ActionPerformed // TODO add your handling code here: this.dispose();

}//GEN-LAST:event_jButton3ActionPerformed

private

void

jTextField1ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jTextField1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jTextField1ActionPerformed

private

void

jTextField2ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jTextField2ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jTextField2ActionPerformed

36

private

void

jButton4ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton4ActionPerformed // TODO add your handling code here: DebugAdmin da=new DebugAdmin(); da.setVisible(true); this.dispose(); }//GEN-LAST:event_jButton4ActionPerformed

private

void

jButton5ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton5ActionPerformed try { new tester().music1(); } catch(Exception c) { System.out.println(c); } }//GEN-LAST:event_jButton5ActionPerformed

private

void

jButton6ActionPerformed(java.awt.event.ActionEventevt)

{//GEN-

FIRST:event_jButton6ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jButton6ActionPerformed

/** * @paramargs the command line arguments */ public static void main(String args[]) { /* * Set the Nimbus look and feel 37

*/ //<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; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Game.class.getName()).log(java.util.logging.Level.SEVERE , null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Game.class.getName()).log(java.util.logging.Level.SEVERE , null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Game.class.getName()).log(java.util.logging.Level.SEVERE , null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Game.class.getName()).log(java.util.logging.Level.SEVERE , null, ex); } //</editor-fold>

/* 38

* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() {

public void run() { new Game().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables privatejavax.swing.JButton jButton1; privatejavax.swing.JButton jButton2; privatejavax.swing.JButton jButton3; privatejavax.swing.JButton jButton4; privatejavax.swing.JButton jButton5; privatejavax.swing.JButton jButton6; privatejavax.swing.JButton jButton7; privatejavax.swing.JLabel jLabel1; privatejavax.swing.JLabel jLabel2; privatejavax.swing.JLabel jLabel3; privatejavax.swing.JTextField jTextField1; privatejavax.swing.JTextField jTextField2; // End of variables declaration//GEN-END:variables

} Tester.java : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ packageguesstheword; 39

/** * * @author Dell */ importsun.audio.*; import java.io.*; importjavax.print.PrintException;

class tester { staticint counter=0; void music()throws IOException { try { InputStream in=new FileInputStream("E:/s.wav"); AudioStream as=new AudioStream(in); AudioPlayer.player.start(as); } catch(Exception c) { System.out.println(c); } } void music1()throws IOException { try { counter++; InputStream in=new FileInputStream("E:/a.wav"); AudioStream as=new AudioStream(in); 40

AudioPlayer.player.start(as); if(counter>1) { InputStream in1=new FileInputStream("E:/c.wav"); AudioStream as1=new AudioStream(in1); AudioPlayer.player.start(as1); } } catch(Exception c) { System.out.println(c); } } } SqlUtil : packageguesstheword;

importjava.io.InputStream; importjava.sql.*; importjava.util.ArrayList;

public class SqlUtil {

private static String driver; private static String url; private static String sqluser; private static String sqlpwd;

public static Connection getConnect() throws Exception {

newSqlUtil().loadValues(); 41

try{ Class.forName(driver); }catch(Exception e) { System.out.println("Loading Driver Failed"); } Connection con = DriverManager.getConnection(url, sqluser, sqlpwd); return con; } public static intins_up_del(String query, ArrayListparam) throws Exception { Connection con = getConnect(); PreparedStatementps = con.prepareStatement(query); if (param != null &&param.size() > 0) { for (int index = 0; index <param.size(); index++) { ps.setObject(index + 1, param.get(index)); } } introwsAffected = ps.executeUpdate(); returnrowsAffected; }

public static ResultSetgetData(String query, ArrayListparam) throws Exception { Connection con = getConnect();

PreparedStatementps = con.prepareStatement(query); if (param != null &&param.size() > 0) { for (int index = 0; index <param.size(); index++) { ps.setObject(index + 1, param.get(index)); } } ResultSetrs = ps.executeQuery(); 42

returnrs; }

voidloadValues() throws Exception { InputStream is = this.getClass().getResourceAsStream("values.properties"); java.util.Propertiespr = new java.util.Properties(); pr.load(is); driver = pr.getProperty("driver"); url = pr.getProperty("url"); sqluser = pr.getProperty("sqluser"); sqlpwd = pr.getProperty("sqlpwd"); } } Debugger.java : /* * To change this template, choose Tools | Templates * and open the template in the editor. */ packageguesstheword;

importjava.sql.ResultSet; importjava.util.ArrayList; importjavax.swing.JOptionPane;

/** * * @author Dell */ public class DebugAdmin extends javax.swing.JFrame {

/** 43

* Creates new form DebugAdmin */ publicDebugAdmin() { 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. */ @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(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(51, 51, 51));

jLabel1.setFont(new java.awt.Font("Impact", 0, 24)); // NOI18N 44

jLabel1.setForeground(new java.awt.Color(204, 204, 204)); jLabel1.setText("Welcome to Game Debugger");

jLabel2.setFont(new java.awt.Font("IskoolaPota", 0, 24)); // NOI18N jLabel2.setText(""\This is Administrative Service........ Login to Continue!!!\"");

jLabel3.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel3.setForeground(new java.awt.Color(204, 204, 204)); jLabel3.setText("Username : ");

jLabel4.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel4.setForeground(new java.awt.Color(204, 204, 204)); jLabel4.setText("Password : ");

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

jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jTextField2ActionPerformed(evt); } });

jButton1.setBackground(new java.awt.Color(51, 51, 51)); jButton1.setText("Login! --->"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton1ActionPerformed(evt); 45

} });

jButton2.setBackground(new java.awt.Color(51, 51, 51)); jButton2.setText("Go Back <---"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEventevt) { jButton2ActionPerformed(evt); } });

jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guesstheword/words.jpg"))); /* NOI18N jLabel5.setText("jLabel5");*/

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 776,

javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE)

46

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,

313, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(221, 221, 221)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jButton2) .addContainerGap()))))) .addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel3) 168,

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

47

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 527, 168,

javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(108, 108, 108) .addComponent(jButton1))) .addContainerGap(33, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 70,

javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 48,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(117, 117, 117)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN E) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 48

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN E) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1) .addGap(28, 28, 28) .addComponent(jButton2) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(59, 59, 59) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 214,

javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 188, Short.MAX_VALUE)))) );

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 49

.addComponent(jPanel1,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) );

pack(); }// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEventevt) { // TODO add your handling code here: Game gm=new Game(); gm.setVisible(true); this.dispose(); }

private void jButton1ActionPerformed(java.awt.event.ActionEventevt) { // TODO add your handling code here: String scram=jTextField1.getText(); String ori=jTextField2.getText(); try {

String query = "select * from login where username=? and password=?"; ArrayList al = new ArrayList(); al.add(scram); al.add(ori); ResultSetrs = SqlUtil.getData(query, al); if (rs.next()) { jTextField2.setText("***********"); JOptionPane.showMessageDialog(this, "Correct!!! Welcome Administrator ^_^"); new debugger().setVisible(true); } else { jTextField2.setText("***********"); 50

JOptionPane.showMessageDialog(this, "Incorrect!! Try Again!! *_* "); } } catch (Exception ec) { ec.printStackTrace(); } }

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

private void jTextField2ActionPerformed(java.awt.event.ActionEventevt) { // TODO add your handling code here: }

/** * @paramargs 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()) { 51

if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(DebugAdmin.class.getName()).log(java.util.logging.Level.S EVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(DebugAdmin.class.getName()).log(java.util.logging.Level.S EVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(DebugAdmin.class.getName()).log(java.util.logging.Level.S EVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(DebugAdmin.class.getName()).log(java.util.logging.Level.S EVERE, null, ex); } //</editor-fold>

/* * Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() {

public void run() { newDebugAdmin().setVisible(true); } }); } // Variables declaration - do not modify 52

privatejavax.swing.JButton jButton1; privatejavax.swing.JButton jButton2; privatejavax.swing.JLabel jLabel1; privatejavax.swing.JLabel jLabel2; privatejavax.swing.JLabel jLabel3; privatejavax.swing.JLabel jLabel4; privatejavax.swing.JLabel jLabel5; privatejavax.swing.JPanel jPanel1; privatejavax.swing.JTextField jTextField1; privatejavax.swing.JTextField jTextField2; // End of variables declaration }

53

CHAPTER 9

OUTPUT

54

Chapter : 9 OUTPUT

Front page

55

Word guess

56

Correct guess

57

Incorrect guess

58

Debug page

59

Background image

60

CHAPTER = 10

(I) ADVANTAGES OF JAVA

61

Chapter: 10 (I) ADVANTAGES OF JAVA


1. Java is platform Independent:Java is totally platform independent language and can implement on any platform because of generating byte code.

2. Object Oriented: In JAVA all program code resides within objects and classes. Java comes with an extensive set of classes, arranged in packages that we can use in our programs by inheritance.

3. Robust: Java is a strictly typed language; it checks code at compile time as well as run time. Java includes the feature of exception handling.

4. Data Security : Java is depends upon oops concepts in which you must implement the class & data in class is by default private for the other package which cant be accessible in any way / manner into other classes , so out data is totally secure .

5. Multithreading: Java supports multithreaded programming which means handling multiple tasks simultaneously. We need not wait for an application to finish one task before beginning another.

62

CHAPTER 10

(II) ADVANTAGES OF MYSQL

63

ADVANTAGES OF MYSQL
1. Handles large databases and performs space management: Oracle provides support for handling large amount of data stored in the database. It allows full control of space uses to make efficient use of expensive hardware devices.

2. High performance: Oracle maintains high degree of system performance by implementing database tasks in parallel which speed up querying, maintenance of the database.

3. Availability of data: Operations such as database backup failure do not interrupt the availability of the data to the users.

4. Security: Oracle provides security by password expiration and forced password changes, password history maintenance to prevent users from reusing previous passwords.

5. Portability: Oracle can be easily ported to work under different operating system like Windows 95, Windows NT, Windows 2000, UNIX, Linux etc.

6. Replication of data: Oracle allows keeping copies of the database objects in multiple databases that make up a distributed database system. It provides users with fast local access to shared data and protects availability of data because alternate database access options exist.

64

CHAPTER 11

FUTURE SCOPE

65

Chapter: 11 FUTURE SCOPE


This is a PUZZLE GAME. This application requires a lot of entries in the Database. The Database used here at the backend is MySQL. The first puzzle game was developed years ago in 1876. The future scope of this project is that we can embed it with any other application like an Audio player and that will be a new kind of combo. In that user can listen songs, as well as play puzzle game. In technical terms, this application requires a number of Java and MySQL lines of codes, so by developing this puzzle game the technical skills of the programmer will be sharpened. In general, this application is also sharpening the mind and testing the IQ level of the player, this is a very interesting kind of application. We can also attach some new mind sharpening games in FUTURE or we can develop a software/ application which contain a number of games that can test players different kind of skills like: 1. Ability to Remember 2. Ability of Recognition (like colors, etc.) 3. Ability to Calculate, and off course 4. Ability to Solving So, this puzzle game has a wide future scope both technically and generally. In short, its just a glimpse of what could be a big and best application.

66

CHAPTER 12

CONCLUSION

67

Chapter: 12 CONCLUSION
This is to conclude that the project that I undertook was worked upon with a sincere effort. Most of the requirements have been fulfilled up to the mark and the requirements which have been remaining, can be completed within a short extension .

68

CHAPTER 13

REFERENCES

69

Chapter: 13 REFERENCES
en.wikipedia.org/wiki/Coupon www.scribd.com Research Internet & Technology kaderphy.hubpages.com All Topics Technology seminarprojects.com/s/existing-system-in-java websearch.about.com/.../gamesearch/.../advantages-online-... websearch.about.com/.../gamesearch/.../advantages-online-... anamikas.hubpages.com ... Frugal Living Bargain Shopping www.mwsearch.com/jumblewordadvice.html katrinasui.hubpages.com All Topics Business and Employment www.fotosearch.com/photos-images/online.html www.royalimages.in/Pages/Home.aspx www.saching.com/Article/Disadvantages-of-java/3488 www.fast-counter.com/disadvantages-of-gaming/ seminarprojects.com/s/future-scope-of-online-shopping www.pressreleasepoint.com/bright-future-online-shoppi... - United States

70

Das könnte Ihnen auch gefallen