INTRODUCTION
The project is based on “GAME PUZZLE”. In modern civilization has become so complicated and sophisticated that to survive one has to be competitive. This compiles the people to be acquainted with all type of happening in the society; mankind is surrounded with a vast amount of data available. Modern business management system has also rendered in a fashion so that it can be utilized with minimum possible time. Paper files require a high amount of storage space and storage creates several other problems like fire risk, spoilage and deterioration by way of aging humidity etc. Computerization of documents and the files has solved this problem to create extent. Not only this, but it has to be high amount of relaxation to human mind, as everything can be automated. Now the documents can in a number of ways, styles and number of documents can be created as and when required without making any mistakes.
The suitable of computerization for an application may be determined as follows:
Volume of storage and calculation: Computerization is best suited to handle large volume of data. The sufficient, economic and reliable storage characteristic of computer media must be exploited properly.
Quality of Output: Quality of output in terms of accuracy, elegance of output, aesthetics in formality through use of word processing and powerful editing could justify use of a computer.
Computerized solutions should be cost justifiable: Money, time saving and efficiency justify the cost of preparing writing and executing a program, Now-computer devices such as calculator can perform money tasks more economically.
PROBLEM DEFINITION
The institute currently operates under a manual system of conducting exams of students. The primary function of the staff is to file and retrieve the information regarding the students, tests and tests type, performance reports of every student in different subjects, and to maintain batch records.
There are the five major areas in which the manual system affects costs:
- Slow retrieval time results
- The system is labor and space intensive
- The manual system produces a risk of missing files
- There is a lack of confidently.
- No back up exists to support disaster recover.
The volume of paper is one of the things that stand in the way of increasing productivity in institute.
Document retrieval Costs Because batches are rarely cross referenced, the staff might have to look under several headings to locate pertinent data. Even if the staff is conscientious about filling methods, locating documents is still a labor and cost intensive operation.
Value of missing information Combined with the typical lost document static’s reviewed above, one could estimate the industry average cost of not having the document’s information when needed. But to obtain first hand actual data for as software organization. This company decided to measure that actual dollar value of lost information. Over a two week period, the file staff filled out a form for each request to retrieve a document from the storage rooms. The data collected documented the total number of filed requested and the results of each request. Maintaining Registers is Costly Traditionally, documents have been stored in batches and then filed in the cabinets and boxes. A numerical system is then assigned. Specially a batch number assigned to organize the files. Operative notes are classified alphabetically.
Listed below are the cost elements in our paper based filling system:
Labor: Creating new files, labeling, applying batch header sheets to file into the system, collating and entering information into a batch log book.
Supplies: File folders, dividers, folder labels, batch header sheets, requisitions slips, file logs and filling boxes.
Equipment: File cabinets and shelving units
Drawbacks of the Existing System
- Due to large of data a lot of complexities are involved in maintaining, updating and retrieving selected information, since old system is totally maintained manually, some of the complexities involved in existing system is as follows:
- Redundancy of data: In the existing system, all data is maintained in different files and registers. This often leads to considerable duplication of data and redundancy.
- Difficulty in Updating the Data: Problem of updating data in the existing systems since everything is stored in registered and files. It is very difficult and time consuming to update data
- Delay in retrieving information: Retrieving information is quite time consuming process because of large volume of data. If it is required to locate a particular record, a large number of registers have to be scanned.
- Problem or keeping the data: As the data is voluminous, more space is required to store it. Also, everything is stored on papers, so this type of storage is more prone to damage with time and due to other accidental factors.
- No Integration of Relation between data: Present system does not support any type of data integrity.
- Not Informative: It is very difficult to get up to date information in the existing system. If any information is required for any specific purpose. All the sorting to be done manually and the needs to be reentered at some other place
PROJECT OVERVIEW
This a Game Puzzle software, using Java, Swing and AWT. This project does the basic operation of a game puzzle.
In this project all the frames are designed in Swing. Today most programmers use Swing. Swing is a set of classes that provides more powerful and flexible GUI components than does the AWT. Swing provides the look and feel of the modern Java GUI.
Swing did not exist in the early days of Java. Rather, it was a response to deficiencies present in Java’s original GUI subsystem: the Abstract Window Toolkit. The AWT defines a basic set of controls, windows, and dialog boxes that support a usable, but limited graphical interface.
PROJECT PLANS
Team Structure
Team Will be comprising of two members.
- Our very able and helpful project guide Mr. Vivek Sood.
- Surbhi Bansal (Trainee), Chitkara Institute of Engineering & Technology ,Jansla(Pb).
Development Schedule
The work in developing the new system commented immediately with our first meeting with the management and users thereafter we were in continuous touch with the management and users of the company.
Phases Involved in the development of the system
- Identify needs and benefits
- Held meetings with the management and user
- Studied and identified the existing system.
- Identify needs and project constraints
- Established project statements
- Prepared a detailed report of the existing system at work.
- Prepare the software requirement specifications .
- Actual coding started
Puzzle Game snap Shot
Coding Of Puzzle Game in java
import java.io.*;
import java.lang.*;
import java.awt.Graphics;
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.lang.String;
import javax.swing.*;
public class game_puzzle extends JApplet implements ActionListener, KeyListener
{
private MyButton[] button;
private JLabel label1,label2,label3,label4;
private JTextField textf1,textf2;
private String[] Strbutton={
"7","8","4","3","6","1","2","5"," ","Start","Restart","Finish"};
private String[] Strbutton1={
"1","2","3","4","5","6","7","8"," "};
private int click_count;// Counts the number of clicks by the player.
GridBagLayout grid = new GridBagLayout();
GridBagConstraints gbc1 = new
GridBagConstraints();
JPanel pan1,pan2;
String str1="";
public void init()// To initialise different variables.
{
label1 = new JLabel("Puzzle"); //Initialising the labels.
label1.setFont(new Font("Times Roman" , Font.BOLD,20));
label1.setForeground(Color.blue);
label2=new JLabel("Name of the Player");
label2.setFont(new Font("Times Roman" ,Font.BOLD,15));
label2.setForeground(Color.blue);
label3=new JLabel("Number of the Clicks");
label3.setFont(new Font("Times Roman",Font.BOLD,15));
label3.setForeground(Color.blue);
label4=new JLabel ( " ");
button =new MyButton[12];
for(int i=0;i<12;i++)//Creating the advanced buttons like sin & cos & arcsin etc.
{
button[i]= new MyButton ( Strbutton[i],Color.black);
button[i].addActionListener(this);
}
textf1=new JTextField(20);
textf2=new JTextField(20);
textf1.setFont(new Font("Times Roman",Font.BOLD,12));
textf2.setFont(new Font("Times Roman",Font.BOLD,12));
textf1.setText("");
textf1.addKeyListener(this);
textf2.setText("");
click_count=0;//Initialise the clicks to zero.
displayPanel();// Method displayPanel() //is invoked.
} //End of init() method.
class MyButton extends JButton
{
public MyButton(String name, Color xyz)
{
this.setLabel(name);
this.setForeground(xyz);
}
class MouseCalcButtonAdapter extends MouseAdapter
{
public void mouseEntered(MouseEvent me){}
public void mouseExited(MouseEvent me){}
}
}
public void keyTyped(KeyEvent e)//Denotes a key press followed by a key release.
{
char ch;
ch=e.getKeyChar();
str1 = str1 + ch;
}
public void keyPressed(KeyEvent e)//Indicates a key is pushed down.
{
}
public void keyReleased(KeyEvent e)//Indicates a key is Released.
{
}
public void actionPerformed(ActionEvent ae) //Provide the functioning to the game.
{
int index=8,i;
String str,temp,count;
boolean check;
for(i=0;i<9;i++)
{
if(button[i].getLabel()==" ")
index=i;// For checking which button contains the blank label.
}
if(ae.getSource()==button[9])// For enabling the button after the button start is clicked.
{
for(int j=0;j<=8;j++)
button[j].setEnabled(true);
button[9].setEnabled(false); //Disable the start button.
}
if(ae.getSource()==button[10])
//Restart button.
{
for(i=0;i<9;i++)
{
button[i].setEnabled(true);
button[i].setLabel(Strbutton[i]);
}
click_count=0;
textf2.setText("0");
}
if((ae.getSource() != button[9]) || (ae.getSource() != button[10]) )
{
check=checkStatus();
if(check==false)// Check whether the number is arranged in the correct order.
{
if (ae.getSource() == button[0])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==1||index==3)
{
str=button[0].getLabel();
button[0].setLabel(" ");
button[index].setLabel (str);
}
}
if (ae.getSource()== button[1])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==0|| index==4 ||index==2)
{
str=button[1].getLabel();
button[1].setLabel (" ");
button[index]. setLabel(str);
}
}
if (ae.getSource()== button[2])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==1||index==5)
{
str=button[2]. getLabel();
button[2].setLabel(" ");
button[index]. setLabel(str);
}
}
if (ae.getSource()== button[3])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==0||index==4 ||index==6)
{
str=button[3].getLabel();
button[3].setLabel(" ");
button[index].setLabel(str);
}
}
if (ae.getSource()==button[4])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==1||index==3 ||index==5||index==7)
{
str=button[4]. getLabel();
button[4].setLabel(" ");
button[index].setLabel(str);
}
}
if (ae.getSource()==button[5])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==2||index==4 ||index==8)
{
str=button[5]. getLabel();
button[5].setLabel(" ");
button[index].setLabel(str);
}
}
if (ae.getSource()==button[6])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==3||index==7)
{
str=button[6].getLabel();
button[6].setLabel(" ");
button[index].setLabel(str);
}
}
if (ae.getSource()==button[7])
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==6||index==4 ||index==8)
{
str=button[7]. getLabel();
button[7].setLabel(" ");
button[index].setLabel(str);
}
}
if (ae.getSource()==button[8])//Exit button.
{
count=Integer.toString(countClicks());
textf2.setText(count);
if (index==5||index==7)
{
str=button[8]. getLabel();
button[8].setLabel(" ");
button[index]. setLabel(str);
}
}
if(ae.getSource()==button[10])
//Restart button.
{
for(i=0;i<9;i++)
{
button[i].setEnabled(true);
button[i].setLabel(Strbutton[i]);
}
click_count=0;
textf2.setText("0");
}
if (ae.getSource()==button[11])
//Finish button.
{
for(i=0;i<=8;i++)
{
button[i].setLabel (Strbutton1[i]);
}
click_count=0;
textf2.setText("0");
button[11].setEnabled(false);
button[10].setEnabled(false);
}
}
else//If the game is completed.
{
String st = str1 + ", you have won the game.";
for (int j=0;j<=8;j++)
button[j].setEnabled(false);
JOptionPane.showMessageDialog(null,st);
}
}
}//End of actionPerformed() method.
void displayPanel()// Designing the layout.
{
JPanel pa4 = new JPanel();
pan1 = new JPanel(); // Creating the main panel on which all the component will be placed.
// Setting the colour for the interface.
pan1.setLayout(grid); // Setting the layout as grid bag layout.
gbc1.weightx = 100;
gbc1.weighty = 100;
gbc1.ipady = 0; //Height of Component.
gbc1.ipadx = 0; //Width of Component.
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 0;
gbc1.gridy = 0;
grid.setConstraints(label1, gbc1);
pan1.add(label1);// Attaching the label //label1 on the panel pan1.
gbc1.weightx=100;
gbc1.weighty = 100;
gbc1.ipady = 5;//Height of Component.
gbc1.ipadx = 5; //Width of Component.
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 1;
gbc1.gridy = 0;
grid.setConstraints(button[9], gbc1);
pan1.add(button[9]);
gbc1.weightx=100;
gbc1.weighty = 100;//Vertical Space.
gbc1.ipady = 0; //Height of Component.
gbc1.ipadx = 0;
gbc1.gridwidth =1;
gbc1.gridheight=2;
gbc1.gridx = 0;
gbc1.gridy = 2;
grid.setConstraints(label2, gbc1);
pan1.add(label2);
gbc1.weightx=100;
gbc1.weighty = 100;
gbc1.ipady = 0;
gbc1.ipadx = 0;
gbc1.gridwidth =1;
gbc1.gridheight=2;
gbc1.gridx = 1;
gbc1.gridy = 2;
grid.setConstraints(textf1, gbc1);
pan1.add(textf1);
gbc1.weightx = 100;
gbc1.weighty = 100;
gbc1.ipady = 0;
gbc1.ipadx = 0;
gbc1.gridwidth =1 ;
gbc1.gridheight=2;
gbc1.gridx = 0;
gbc1.gridy = 4;
pa4.setLayout(new GridLayout(3,3,5,5));
for(int i=0;i<9;i++)
{
pa4.add(button[i]);
button[i].setEnabled(false);
}
grid.setConstraints(pa4, gbc1);
pan1.add(pa4);
gbc1.weightx=100;
gbc1.weighty=100;
gbc1.ipady = 0;
gbc1.ipadx = 0;
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 0;
gbc1.gridy = 6;
grid.setConstraints(label3, gbc1);
pan1.add(label3);
gbc1.ipady = 0;
gbc1.ipadx = 0;
gbc1.weightx = 100;
gbc1.weighty = 100;
gbc1.gridwidth =1 ;
gbc1.gridheight=1;
gbc1.gridx = 1;
gbc1.gridy = 6;
grid.setConstraints(textf2, gbc1);
pan1.add(textf2);
gbc1.ipady = 5;
gbc1.ipadx = 5;
gbc1.weighty = 100;
gbc1.weightx = 100;
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 0;
gbc1.gridy = 7;
grid.setConstraints(button[10], gbc1);
pan1.add(button[10]);
gbc1.ipady = 5;
gbc1.ipadx = 5;
gbc1.weighty = 100;
gbc1.weightx = 100;
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 1;
gbc1.gridy = 7;
grid.setConstraints(button[11], gbc1);
pan1.add(button[11]);
gbc1.ipady = 0;
gbc1.ipadx = 0;
gbc1.weighty = 100;
gbc1.weightx = 100;
gbc1.gridwidth =1;
gbc1.gridheight=1;
gbc1.gridx = 0;
gbc1.gridy = 8;
grid.setConstraints(label4, gbc1);
pan1.add(label4);
gbc1.ipady = 5;
gbc1.ipadx = 5;
getContentPane().add(pan1);
}// End of the method displayPanel().
public int countClicks()// For incrementing the clicks counter.
{
return(++click_count);
}//End countClicks() method.
public boolean checkStatus()// To check the game is finish or not.
{
int i;
if (button[0].getLabel() == "1" &&
button[1].getLabel() == "2"&&
button[2].getLabel() == "3" &&
button[3].getLabel() == "4"&&
button[4].getLabel() == "5" &&
button[5].getLabel() == "6"&&
button[6].getLabel() == "7" &&
button[7].getLabel() == "8"&&
button[8].getLabel() == " ")
{
return(true);
}
else
return(false);
}//End checkStatus() method.
} // End of game_puzzle class.