Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

Student Registration System

ABSTRACT
The aim of this project is to build a student registration system that will completely
automate the process of new student registration in a university. The system will handle the
document submission, testing process and registration of new students.
The system will be web based and will have two implementations i.e. client side
(student) and server side (university). The server side implementation can only be accessed
over the university intranet while the client side can be accessed over the internet.
The process begins when prospective students wish to enrol in the university. If they
express interest in any course they will be required to visit the university and can create a user
account at the administration block. This is the only part of the system where every user has to
have human interaction, this is intended as a security measure to prevent the creation of false
user IDs. After verification of any nationally approved photo ID proof a user account will be
created and a scanned copy of the ID proof will be uploaded into the profile. After this the user
can upload all necessary documents on the portal from the convenience of their home. The
system will automatically validate all the documents and the prospective student will be able to
schedule a test date after successful validation. The test will be conducted on the premises of
the university or at regional test centres and will require the authentication of user credentials.
The test results will be normalised and a score will be immediately published. After the
completion of all tests the system will automatically publish a merit list to indicate which
students have gained admission.
Students will be able to accept or decline offers of admission using this portal. After
accepting admission the documents uploaded will be scrutinized by university authorities and
any discrepancies notified. After all error flags are cleared the student will be able to make the
first fee payment via internet banking through the system, following which the system will
assign the student a unique roll number and register them as a student of the university. This
system will automatically update the new student details into the university student database.

Existing System
The existing system of registration requires many documents and application forms to
be filled out. Data has to be repeatedly entered at each stage of the process and multiple files
are made for each student. Documents are verified with multiple copies made for record and
the testing process is conducted independently which again compounds the paperwork
required. The amount of data processing required for each stage of the process ensures that
the process of new student admission takes a long time.

Proposed System
The proposed system will eliminate the paper trail required for the completion of
various formalities. The entire process of prospective student registration till new student
registration can be handled by this system. The testing process can be done entirely on the
system and results can be quickly judged and shared. The presence of this system will remove
ambiguity in the process that can confuse tense prospective students.

Modules
Admin: The admin will be able to create prospective student profiles after verification of
nationally approved photo IDs of the user. The admin will be able to cancel student accounts if
irregularities are detected.
Prospect: The prospective student will use this module to upload documents and schedule test
dates. The rank list can also be accessed through this module.
Testing: The testing module can be used by the student during the testing phase. A total score
will be displayed at the end of the test and results will be stored centrally.
New registration: Once a prospective student achieves an acceptable rank and accepts the
offer of admission they will be shifted to the new registration module and allotted a unique roll
number. The admin will scrutinize the documents of users in the new registration module and
notify them about discrepancies. The new student will be able to pay initial fees through this
module and will be notified about the next process through this module. This module will
automatically update the student database with the details of the new student.

Software Requirements
 Windows XP
 Apache Tomcat Web Server
 Oracle

Technology Used
 Java
 J2EE

Hardware Requirements
 Hard Disk – 2 GB
 RAM – 1 GB
 Processor – Dual Core or Above
 Mouse
 Keyboard
 Monitor
 Printer
OUTPUT
This software project is just a part of Student Management System. The software is used by the
students to register their courses in the semester through Internet and/or LAN. Remote Method
Invocation (RMI) and JDBC technologies are involved here. It supports multiple login and
registration status anytime and from ANY part of the WORLD.

Compile :
From the folder ‘server’, double click on ‘CompileAll.bat’ file to run.

Run :
Server Side:

1. From the folder ‘server’ open ‘runServer.bat’ file using Notpad or any other editor.
2. Change the path as required in the first line:
set PATH=D:\jdk\bin

3. Save and exit from the editor.


4. Double click on ‘runServer.bat’ file to run.

Client Side:

1. From the folder ‘client’ open ‘run.bat’ file using Notpad or any other editor.
2. Change the path as required in the first line:
set PATH=D:\jdk\bin

3. Change the second line:


java ClientLogin 127.0.0.1

replace the 127.0.0.1 with the server IP. Say:

java ClientLogin 123.123.123.123

or if you want to test it locally in the same machine leave it as it is.


4. Save and exit from the editor.
5. Double click on ‘run.bat’ file to run.
6. When username and password asks, try the following:
Username: zim
Password: 123

Username: admin

Password: 1234

7. You may see a window like the following:

8. Try the following student IDs and press Enter:


03-03666-1, 01-01111-1, 02-02222-2, 03-03333-3

9. Now use however you like.


CLIENT LOGIN SOURCE CODE
import java.rmi.*;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class ClientLogin extends JFrame implements ActionListener,


KeyListener
{
private JButton btnCancel;
private JButton btnOK;
private JPasswordField txtPass;
private JTextField txtName;
private JLabel lblPass;
private JLabel lblName;
private static ServerIntf rmiObj;

public ClientLogin()
{
//Setting up JFrame (ClientLogin)..
super("preAdvising Client Login");
Container con = getContentPane();
con.setLayout(null);

//Setting up JButton (btnCancel)..


btnCancel = new JButton("Cancel");
btnCancel.setBounds(154, 123, 84, 25);
con.add(btnCancel);

//Setting up JButton (btnOK)..


btnOK = new JButton("OK");
btnOK.setBounds(63, 123, 84, 25);
con.add(btnOK);

//Setting up JPasswordField (txtPass)..


txtPass = new JPasswordField();
txtPass.setBounds(95, 79, 144, 21);
con.add(txtPass);

//Setting up JTextField (txtName)..


txtName = new JTextField();
txtName.setBounds(95, 44, 144, 21);
con.add(txtName);

//Setting up JLabel (lblPass)..


lblPass = new JLabel("Password:");
lblPass.setBounds(24, 79, 64, 17);
con.add(lblPass);

//Setting up JLabel (lblName)..


lblName = new JLabel("Name:");
lblName.setBounds(51, 44, 60, 17);
con.add(lblName);
txtName.addKeyListener(this);
txtPass.addKeyListener(this);
btnOK.addActionListener(this);
btnCancel.addActionListener(this);

setSize(277, 210);
setLocation(100, 100);
setResizable(false); // Set MAX button and Resizing
disabled
setVisible(true);
}

public void keyPressed(KeyEvent e)


{
if(e.getKeyCode()==KeyEvent.VK_ENTER)
{
String u = txtName.getText();
String p = new String(txtPass.getPassword());

if(u.equals("") || p.equals(""))
{
JOptionPane.showMessageDialog(null, "Type
username and password.", "Warning!",
JOptionPane.WARNING_MESSAGE);
return;
}
try
{
if(rmiObj.validUser(u, p))
{
ClientMain cm = new ClientMain(rmiObj);

cm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(false);
}
else
JOptionPane.showMessageDialog(null,
"Invalid username and/or password.", "Error!",
JOptionPane.WARNING_MESSAGE);
}
catch(Exception ex)
{
System.out.println(ex);
}
}
}

public void keyReleased(KeyEvent e) {}


public void keyTyped(KeyEvent e) {}

public void actionPerformed(ActionEvent e)


{
if(e.getSource()==btnCancel)
System.exit(0);
if(e.getSource()==btnOK)
{
String u = txtName.getText();
String p = new String(txtPass.getPassword());

if(u.equals("") || p.equals(""))
{
JOptionPane.showMessageDialog(null, "Type
username and password.", "Warning!",
JOptionPane.WARNING_MESSAGE);
return;
}

try
{
if(rmiObj.validUser(u, p))
{
ClientMain cm = new ClientMain(rmiObj);

cm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(false);
}
else
JOptionPane.showMessageDialog(null,
"Invalid username and/or password.", "Error!",
JOptionPane.WARNING_MESSAGE);
}
catch(Exception ex)
{
System.out.println(ex);
}
}
}

public static void main(String args[])


{
try
{
ClientLogin app = new ClientLogin();

app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

rmiObj =
(ServerIntf)Naming.lookup("rmi://"+args[0]+"/preAdvisingServer
");
}
catch(Exception e)
{
System.out.println(e);
}
}
}
CLIENT MAIN PAGE SOURCE CODE

import java.util.Vector;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class ClientMain extends JFrame implements ActionListener, KeyListener, ItemListener


{
private JButton btnCancel;
private JButton btnReg;
private JButton btnRef;
private JButton btnRem;
private JList lstSub;
private JButton btnAdd;
private JComboBox cmbSubList;
private JTextField txtID;
private JLabel lblSubList;
private JLabel lblStudID;
private JLabel lblTaken;

private ServerIntf rmiObj;


private Vector takenSub;

public ClientMain(ServerIntf rmiObj)


{
//Setting up JFrame (ClientMain)..
super("preAdvising Client Main");
Container con = getContentPane();
con.setLayout(null);

//Setting up JTextField (txtID)..


txtID = new JTextField();
txtID.setBounds(123, 40, 144, 21);
con.add(txtID);

//Setting up JButton (btnCancel)..


btnCancel = new JButton("Cancel");
btnCancel.setBounds(285, 325, 84, 25);
con.add(btnCancel);

//Setting up JButton (btnReg)..


btnReg = new JButton("Register");
btnReg.setEnabled(false);
btnReg.setBounds(103, 325, 84, 25);
con.add(btnReg);

//Setting up JButton (btnRef)..


btnRef = new JButton("Refresh");
btnRef.setBounds(194, 325, 84, 25);
con.add(btnRef);

//Setting up JButton (btnRem)..


btnRem = new JButton("Remove");
btnRem.setEnabled(false);
btnRem.setBounds(376, 143, 84, 25);
con.add(btnRem);

//Setting up JButton (btnAdd)..


btnAdd = new JButton("Add");
btnAdd.setEnabled(false);
btnAdd.setBounds(285, 111, 84, 25);
con.add(btnAdd);

//Setting up JList (lstSub)..


lstSub = new JList();
JScrollPane splstSub = new JScrollPane(lstSub);
splstSub.setLocation(51, 143);
splstSub.setSize(318, 171);
con.add(splstSub);

//Setting up JComboBox (cmbSubList)..


cmbSubList = new JComboBox();
cmbSubList.setBounds(123, 71, 247, 21);
con.add(cmbSubList);

//Setting up JLabel (lblSubList)..


lblSubList = new JLabel("Subject List:");
lblSubList.setBounds(51, 75, 76, 17);
con.add(lblSubList);
//Setting up JLabel (lblStudID)..
lblStudID = new JLabel("Student ID:");
lblStudID.setBounds(55, 40, 92, 13);
con.add(lblStudID);

//Setting up JLabel (lblTaken)..


lblTaken = new JLabel("Subjects taken in this semester:");
lblTaken.setBounds(51, 127, 255, 17);
con.add(lblTaken);

this.rmiObj = rmiObj;

cmbSubList.addItemListener(this);
txtID.addKeyListener(this);
btnAdd.addActionListener(this);
btnReg.addActionListener(this);
btnCancel.addActionListener(this);
btnRef.addActionListener(this);
btnRem.addActionListener(this);

setSize(505, 408);
setLocation(100, 100);
setResizable(false); // Set MAXIMIZE button and Resizing disabled
setVisible(true);
}
public void itemStateChanged(ItemEvent e)
{
if(e.getStateChange()==1)
// tmpSub = (String)e.getItem();
;
}

public void keyPressed(KeyEvent e)


{
Vector v = new Vector();
if(e.getKeyCode()==KeyEvent.VK_ENTER)
{
try
{
v = rmiObj.retNotDoneSubList(txtID.getText());
if(v.size()<1)
{
JOptionPane.showMessageDialog(null, "Incorrect ID.",
"Warning!", JOptionPane.WARNING_MESSAGE);
lstSub.setListData(new Vector());
cmbSubList.removeAllItems();
txtID.setText("");
btnAdd.setEnabled(false);
btnRem.setEnabled(false);
btnReg.setEnabled(false);
}
lstSub.setListData(new Vector());
cmbSubList.removeAllItems();

for(int i=0; i<v.size(); ++i)


cmbSubList.addItem(v.elementAt(i));

if(v.size()>0)
btnAdd.setEnabled(true);

takenSub = rmiObj.retTakenSubList(txtID.getText());
lstSub.setListData(takenSub);
if(takenSub.size()>0)
{
btnRem.setEnabled(true);
btnReg.setEnabled(true);
}
}
catch(Exception ex)
{
System.out.println(ex);
}
}
}

public void keyReleased(KeyEvent e) {}


public void keyTyped(KeyEvent e) {}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==btnCancel)
System.exit(0);

if(e.getSource()==btnRef)
{
txtID.setText("");
cmbSubList.removeAllItems();
lstSub.setListData(new Vector());
}

if(e.getSource()==btnAdd)
{
if(cmbSubList.getSelectedIndex()==-1)
{
JOptionPane.showMessageDialog(null, "You have to select a
subject first to add.", "Warning!", JOptionPane.WARNING_MESSAGE);
return;
}
for(int i=0; i<takenSub.size(); ++i)

if(takenSub.get(i).toString().equals(cmbSubList.getSelectedItem().toString()))
{
JOptionPane.showMessageDialog(null, "You already have
added this subject in the list.", "Warning!", JOptionPane.WARNING_MESSAGE);
return;
}
takenSub.add(cmbSubList.getSelectedItem().toString());
lstSub.setListData(takenSub);
if(takenSub.size()>0)
btnReg.setEnabled(true);
}

if(e.getSource()==btnReg)
{
if(txtID.getText().equals(""))
{
JOptionPane.showMessageDialog(null, "You have not entered
student ID.", "Warning!", JOptionPane.WARNING_MESSAGE);
return;
}

try
{
rmiObj.regSub(takenSub, txtID.getText());
}
catch(Exception ex)
{
System.out.println(ex);
}
}

if(e.getSource()==btnRem)
{
if(lstSub.getSelectedIndex()==-1)
{
JOptionPane.showMessageDialog(null, "You have to select a
subject first from the list to remove.", "Warning!", JOptionPane.WARNING_MESSAGE);
return;
}

Object[] tmp = lstSub.getSelectedValues();


for(int i=0; i<tmp.length; ++i)
takenSub.removeElement(tmp[i].toString());
lstSub.setListData(takenSub);
if(takenSub.size()>0)
btnReg.setEnabled(true);
}
}
}

POLICY
grant
{
permission java.security.AllPermission;
};
SERVER
SERVER SOURCE CODE:

import java.util.Vector;
import java.rmi.*;
import java.rmi.server.*;
import java.sql.*;

class ServerImpl extends UnicastRemoteObject implements ServerIntf


{
public ServerImpl() throws RemoteException
{
super();
}

public void regSub(Vector v, String sid)


{
System.out.println("* Client: void regSub(Vector, "+sid+")");

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:db","","");
Statement stm = con.createStatement();
stm.executeUpdate("UPDATE sub SET status='Not done'
WHERE sid='"+sid+"' AND status='Taken'");
for(int i=0; i<v.size(); ++i)
stm.executeUpdate("UPDATE sub SET status='Taken'
WHERE sid='"+sid+"' AND sub='"+v.get(i)+"'");
stm.close();
con.close();
}
catch(Exception e)
{
System.out.println(e);
}
}

public Vector retNotDoneSubList(String sid)


{
Vector v = new Vector();
System.out.println("* Client: Vector retNotDoneSubList("+sid+")");

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:db","","");
Statement stm = con.createStatement();
ResultSet rs = stm.executeQuery("SELECT sub FROM sub
WHERE sid='"+sid+"' AND status='Not done' ORDER BY sub");
while(rs.next())
v.add(rs.getString("sub"));
stm.close();
con.close();
}
catch(Exception e)
{
System.out.println(e);
}
return v;
}

public Vector retTakenSubList(String sid)


{
Vector v = new Vector();
System.out.println("* Client: Vector retTakenSubList("+sid+")");

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:db","","");
Statement stm = con.createStatement();
ResultSet rs = stm.executeQuery("SELECT sub FROM sub
WHERE sid='"+sid+"' AND status='Taken' ORDER BY sub");
while(rs.next())
v.add(rs.getString("sub"));
stm.close();
con.close();
}
catch(Exception e)
{
System.out.println(e);
}
return v;
}

public boolean validUser(String user, String pass)


{
boolean res = false;
System.out.println("* Client: boolean validUser("+user+",
"+pass+")");

try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbc:odbc:db","","");
Statement stm = con.createStatement();
ResultSet rs = stm.executeQuery("SELECT * FROM Users");
while(rs.next())
if(rs.getString("User").equals(user) &&
rs.getString("Pass").equals(pass))
res = true;
stm.close();
con.close();
}
catch(Exception e)
{
System.out.println(e);
}
return res;
}
}

public class Server


{
public static void main(String args[])
{
try
{
ServerImpl obj = new ServerImpl();
Naming.rebind("preAdvisingServer", obj);
}
catch(Exception e)
{
System.out.println(e);
}
}
}

SERVER INTERFACE SOURCE CODE:

import java.rmi.*;
import java.util.Vector;

public interface ServerIntf extends Remote


{
public boolean validUser(String user, String pass) throws
RemoteException;
public Vector retNotDoneSubList(String sid) throws RemoteException;
public Vector retTakenSubList(String sid) throws RemoteException;
public void regSub(Vector v, String sid) throws RemoteException;
}

POLICY:

grant
{
permission java.security.AllPermission;
};
Student Registration System Project in Java
Student Registration System

Project Objective

            The aim of this Student Registration System project is to build a student
registration system that will completely automate the process of new student registration
in a university. The system will handle the document submission, testing process and
registration of new students. The system will be web based and will have two
implementations i.e. client side (student) and server side (university). The server side
implementation can only be accessed over the university intranet while the client side
can be accessed over the internet.

            The process begins when prospective students wish to enrol in the university. If
they express interest in any course they will be required to visit the university and can
create a user account at the administration block. This is the only part of the system
where every user has to have human interaction, this is intended as a security measure
to prevent the creation of false user IDs. After verification of any nationally approved
photo ID proof a user account will be created and a scanned copy of the ID proof will be
uploaded into the profile. After this the user can upload all necessary documents on the
portal from the convenience of their home. The system will automatically validate all the
documents and the prospective student will be able to schedule a test date after
successful validation. The test will be conducted on the premises of the university or at
regional test centres and will require the authentication of user credentials. The test
results will be normalised and a score will be immediately published. After the
completion of all tests the system will automatically publish a merit list to indicate which
students have gained admission.

            Students will be able to accept or decline offers of admission using this portal.
After accepting admission the documents uploaded will be scrutinized by university
authorities and any discrepancies notified. After all error flags are cleared the student
will be able to make the first fee payment via internet banking through the system,
following which the Student Registration System will assign the student a unique roll
number and register them as a student of the university. This Student Registration
System will automatically update the new student details into the university student
database.
Existing Student Registration System 

            The existing Student Registration System of registration requires many


documents and application forms to be filled out. Data has to be repeatedly entered at
each stage of the process and multiple files are made for each student. Documents are
verified with multiple copies made for record and the testing process is conducted
independently which again compounds the paperwork required. The amount of data
processing required for each stage of the process ensures that the process of new
student admission takes a long time.

Proposed System

            The proposed Student Registration System will eliminate the paper trail required
for the completion of various formalities. The entire process of prospective student
registration till new student registration can be handled by this system. The testing
process can be done entirely on the system and results can be quickly judged and
shared. The presence of this system will remove ambiguity in the process that can
confuse tense prospective students.

Student Registration System Modules

Admin: The admin will be able to create prospective student profiles after verification of
nationally approved photo ID’s of the user. The admin will be able to cancel student
accounts if irregularities are detected.

Prospect: The prospective student will use this module to upload documents and
schedule test dates. The rank list can also be accessed through this module.

Testing: The testing module can be used by the student during the testing phase. A
total score will be displayed at the end of the test and results will be stored centrally.

New registration: Once a prospective student achieves an acceptable rank and


accepts the offer of admission they will be shifted to the new registration module and
allotted a unique roll number. The admin will scrutinize the documents of users in the
new registration module and notify them about discrepancies. The new student will be
able to pay initial fees through this module and will be notified about the next process
through this module. This module will automatically update the student database with
the details of the new student.

Software Requirements

 Windows XP
 Apache Tomcat Web Server
 Oracle

Technology Used

 Java

Hardware Requirements

 Hard Disk – 2 GB
 RAM – 1 GB
 Processor – Dual Core or Above
 Mouse
 Keyboard

You might also like