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

BHARATI VIDYAPEETH INSTITUTE OF TECHNOLOGY

(POLYTECNIC), NAVI MUMBAI

MICROPROJECT
Academic Year : 2022-23
Subject :-Advanced Java
Subject Teacher :-Mithun Mhatre
Semester :-CM5I

Title of Microproject :- Student Management System

Roll no Name of Student Class


9504 Sejal Vartak CM5I
9505 Purva Jage CM5I
9531 Umair Momin CM5I
ACKNOWLEDGEMENT
It is great pleasure for us to acknowledge the assistance & contribution of
the number of individuals who helped us in presenting the Project “Student
Management System”. We have successfully completed our project with
the handful support of Staff, Project Partners, External Resources, etc. We
acknowledge all of them & them for their support.

We would like to give away gratitude to Mr. Mithun Mhatre, Head of


Computer Engineering. Department for prior support in terms of morality,
technical aspects & relative guidance required for the “Student Management
System‟ which helped us get better grip & quality in every aspect of project .

Our sincere thanks to Prof. P.N. Tandon, Principal, Bharati Vidyapeeth


Institute of Technology, Kharghar, for providing us an opportunity to present
& express the ideas of our project.

Thanking You,
Miss. Sejal Vartak

Miss. Purva Jage

Mrs. Umair Momin

SR.NO CONTENT PAGE .NO


1 INTRODUCTION 4

2 PURPOSE 5
3 SCOPE 5

4 PROPOSED SYSTEM 6

5 MODULES 6

4 WHY WE ARE 7
CREATING THIS
SYSTEM

5 FEATURES 7

6 PROGRAM CODE 8

7 OUTPUT 14

8 CONCLUSION 16

CONTENT:

Introduction
A Student Management System Java Code allows you
to keep the student records and manage them when
needed. This is a simple java project with a good and
interactive-looking GUI. This Project Use MySQL
Database for managing all the data that store in the
database.
There are basically two sections in this project i.e. they
are the students and an admin of the school. Into the
student section, you can just only access the student
details. Here, you will have to provide his/her personal
details and their guardian details. Like if he/she is the
principal or regular teacher like parameters. And into
the student’s section, you have to provide the details
of the students. Here the major works are done by the
admin. He can add and delete the student.

 Purpose:
That is the purpose of this project. The major task of this
project is to store the students record. You will provide the
details of each and every section of the data fields. So that
the system can store your accurate information. The
objective of Student information System is to allow the
administrator of any organization to edit and find out the
personal details of a student and allows the student to keep
up to date his profile . It’ll also facilitate keeping all the
records of students, such as their id, name, mailing address,
phone number, DOB etc. So all the information about an
student will be available in a few seconds.

 SCOPE:
Without a Student Management System, managing and
maintaining the details of the student is a tedious job for any
organization. Student Information system will store all the
details of the students including their background
information, educational qualifications, personal details and
all the information related to their resume .

Proposed system
Now the proposed system is developed to solve all the
problems that occurred in the earlier systems. It provides a
user-friendly interface where there is an administrator which
only has the privilege to access the data. This makes system
secure and reliable. This system allows to keep track of the
student’s attendance and maintain all the staff information.
So everything becomes easy thus reducing the risks that
come with an existing system. We have collection of
many java projects with source code which can be used by
students for their academic work.

Modules
 Registration module: In this module, the users of the system have to
register themselves with all their personal details and
after that, they can log in to the system
 Login module: This module page allows different types
of login details for student, admin, teacher, and staff.
 Add module: This allows to add new users to the system
database.
 Save module: This allows to save the records in a
database.
 Delete module: It deleted the student records from a
database.
 View profile module: This module displays information
according to the type of user. The admin can view all the
details while the other users can only view their own
details.
 Attendance module: This module allows to calculate
the attendance of the student and display it.

Why are we creating the Student Management


System Project in Java?
 Easy to understand: It does not have issues like
operator overloading or
pointers, which might make the job more difficult.
 Object-oriented: An object-oriented program is
thought to have a state and behaviour and to provide
output accordingly.
 Security: To prevent data manipulation from
untrusted sources, it runs the application in the
sandbox and transforms it to bytecode after
compilation.

FEATURES:
 Improves students’ overall performance
 It assists in the streamlining of all tasks
 Better Communication
 Assists in keeping track of all students
 Reduced Human Labour , Paperwork, and Workload

PROGRAM CODE
package student.information.system;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.swing.JOptionPane;
import com.sun.glass.events.KeyEvent;
import java.awt.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import javax.swing.*;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
*
* @author Hyrex
*/
public class Login extends javax.swing.JFrame {
Connection conn=null;
ResultSet rs=null;
PreparedStatement pst=null;

/**
* Creates new form Login
*/
public Login() {
initComponents();
conn=db.java_db();
Toolkit toolkit = getToolkit();
Dimension size = toolkit.getScreenSize();
setLocation(size.width/2 - getWidth()/2,
size.height/2 - getHeight()/2);
currentDate();
}
public void currentDate (){

Calendar cal =new GregorianCalendar();


int month = cal.get(Calendar.MONTH);
int year = cal.get(Calendar.YEAR);
int day = cal.get(Calendar.DAY_OF_MONTH);

txt_date.setText((month+1)+"/"+day+"/"+year);
}
/**
* 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">//GEN-BEGIN:initComponents
private void initComponents() {

jPanel1 = new javax.swing.JPanel();


jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
txt_username = new javax.swing.JTextField();
txt_password = new javax.swing.JPasswordField();
txt_combo = new javax.swing.JComboBox<>();
jLabel4 = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
jMenuBar1 = new javax.swing.JMenuBar();
txt_date = new javax.swing.JMenu();
txt_time = new javax.swing.JMenu();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setResizable(false);

jPanel1.setLayout(null);

jLabel2.setText("Username :");
jPanel1.add(jLabel2);
jLabel2.setBounds(20, 280, 70, 14);

jLabel3.setText("Password :");
jPanel1.add(jLabel3);
jLabel3.setBounds(20, 320, 70, 14);

jButton1.setText("Login");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent
evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1);
jButton1.setBounds(180, 390, 70, 30);
jPanel1.add(txt_username);
txt_username.setBounds(90, 270, 160, 30);
jPanel1.add(txt_password);
txt_password.setBounds(90, 310, 160, 30);

txt_combo.setModel(new
javax.swing.DefaultComboBoxModel<>(new String[] { "Admin" }));
jPanel1.add(txt_combo);
txt_combo.setBounds(90, 350, 160, 30);

jLabel4.setText("Division :");
jPanel1.add(jLabel4);
jLabel4.setBounds(20, 360, 50, 14);

jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/student/information/
system/images/bk4.jpg"))); // NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 660, 430);

txt_date.setText("Date");
jMenuBar1.add(txt_date);
txt_time.setText("Time");
jMenuBar1.add(txt_time);

setJMenuBar(jMenuBar1);

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.DEFAULT_SIZE, 661, Short.MAX_VALUE)
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING
)
.addComponent(jPanel1,
javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
);

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

private void jButton1ActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
String sql = "select id,username,password,division from
Users Where (username =? and password =? and division =?)";

try{
int count =0;

pst=conn.prepareStatement(sql);

pst.setString(1,txt_username.getText());
pst.setString(2,txt_password.getText());
pst.setString(3, txt_combo.getSelectedItem().toString());

rs=pst.executeQuery();

{
}
while(rs.next()){
int id = rs.getInt(1);
Emp.empId = id;
count =count+1;
}
String access=(txt_combo.getSelectedItem().toString());
if(access=="Admin") {

if(count==1){
JOptionPane.showMessageDialog(null,"Sucess" );
MainMenu j = new MainMenu();
j.setVisible(true);
this.dispose();

Date currentDate =
GregorianCalendar.getInstance().getTime();
DateFormat df = DateFormat.getDateInstance();
String dateString = df.format(currentDate);

Date d = new Date();


SimpleDateFormat sdf = new
SimpleDateFormat("HH:mm:ss");
String timeString = sdf.format(d);

String value0 = timeString;


String values = dateString;

int value = Emp.empId;


String reg = "insert into Audit
(emp_id,date,status) values ('"+value+"','"+value0+" /
"+values+"','Logged in')";
pst=conn.prepareStatement(reg);
pst.execute();
this.dispose();

else if(count>1){
JOptionPane.showMessageDialog(null,"Duplicate
Username or Password Access denied");
}
else{
JOptionPane.showMessageDialog(null,"Username and
Password is not correct");
}
}

} catch(Exception e)

{
JOptionPane.showMessageDialog(null, e);

}
finally {

try{
rs.close();
pst.close();

}
catch(Exception e){

}//GEN-LAST:event_jButton1ActionPerformed

/**
* @param args 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()) {
if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.u
til.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JPanel jPanel1;
private javax.swing.JComboBox<String> txt_combo;
private javax.swing.JMenu txt_date;
private javax.swing.JPasswordField txt_password;
private javax.swing.JMenu txt_time;
private javax.swing.JTextField txt_username;
// End of variables declaration//GEN-END:variables
}
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package student.information.system;

/**
*
* @author Hyrex
*/
public class StudentInformationSystem {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}

}
OUTPUT
Conclusion
The Student Management System Project in Java is one of
the many systems created that have several functions that
satisfy the current Student Management system needs . It
can be used by educational institutions to maintain their
student records easily. Achieving this objective is difficult
using the manual system as the information is scattered, can
be redundant, and collecting relevant information may be
very time-consuming. All these problems are solved by this
project.
This system helps in maintaining the information of pupils of
the organization. It can be easily accessed by the manager
and kept safe for a long period of time without any changes.

You might also like