0% found this document useful (0 votes)
43 views58 pages

Final 3academic Adminstration System

Uploaded by

akshataharage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views58 pages

Final 3academic Adminstration System

Uploaded by

akshataharage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 58

A Project Report on

“Academic Administrative System”

By
Akshata D Harage
MCA – I, SEM – I

2023-2024

To
Savitribai Phule Pune University
Pune- 411041

In Partial Fulfillment of the Degree of


Master in Computer Application (M. C. A.)

Under The Guidance Of


Prof. Adarsha Katrale

Suryadatta Institutes of Management, Pune


Suryadatta Institute of Management and Mass Communication (SIMMC)
Date:-

CERTIFICATE
This is to certify Akshata D Harage ted his/her project work entitled “Academic Administrative

System” in partial fulfillment of MCA– I Semester program for the year A.Y. 2023-2024. He / She
have worked under our guidance and direction.

Prof. Adarsha Katrale Dr. Manisha Kumbhar


(Project Guide) HOD-MCA, SGI

Examiner 1 Examiner 2

Date:

Place:
Acknowledgment
We started this project as a part of our course curriculum. It gives us great pleasure to present the report of this project
work conducted towards the fulfillment of the project titled “Academic Administrative System”.

We take this opportunity to thank those who have made the efforts in success of the project. We extend our special gratitude
towards Prof. Dr. Manisha Kumbhar(Head of the Department of MCA)and lecturer Prof. Adarsha
Katrale (internal guide) who has been a constant source of motivation, encouragement, and guidance that has gone a
long way in helping the completion of this project. We express our warm wishes to the entire staff members for their assistance
and kind guidance who helped me out of all my queries.

I also heartily thankful to all my friends and “Live Life” for providing me all the useful requirements that were needed by me
for the completion of project.

Thank You…..!

Akshata D Harage
Index
Chapter Page number
CHAPTER 1 : INTRODUCTION
1.1 Existing System 6
1.2 Need for System 6
1.3 Operating Environment Hardware and Software 7
CHAPTER 2 : PROPOSED SYSTEM
2.1 Proposed System (Introduction of system) 9
2.2 Module specifications (Scope) 10
2.3 Objectives of System 11
CHAPTER 3 : ANALYSIS & DESIGN
3.1 Use Case Diagrams 15
3.2 Activity Diagram 16
3.3 Sequence Diagram 17
3.4 E-R Diagram 18
3.5 Module Hierarchy Diagram 19
3.6 Table specifications (Database design) 20
3.7 Data dictionary 21
CHAPTER 4 : USER MANUAL
4.1 User Interface Screens (Input) 27-40
4.2 Output Screens with data 27-40
4.3 Data Reports 27-40
4.4 Test Procedures and cases 41
4.5 Sample program code 42
4.6 References and Bibliography 53
Introduction

1.1 Existing System

• In existing system there are lots of paper work and manual processing.

• Records very carefully as the entire data is written in those book


• Everything is paper based hence it is very time consuming more than person can’t access the data at
same time

• There is no system to check the past transactions on any bill, to do this they have to check payment
register and this task is too much time consuming and tiresome.

• The manually system work very difficult and very complex for manages celebration.

1.2 Need For System

• Keep proper records of items.

• It also maintains correct and quick processing to get some printed output or records. Amount,
Balance amount, etc.

• The main objective of this system to store large amount of data within less time.

• The most important objective is to provide the security. Authority security and further privacy and
provide management of information very quickly.

• To overcome some problem that comes during existing system.

• Now the day, everyone lives with very fast life; no one can wait a time consuming so new system does
necessary and speedy job daily monthly yearly easily and quickly.

An ocan be a valuable tool academic administrative system various organizations and institutions. Here
are some of the reasons why there is a need for such a system:

1. Accuracy: Academic Administrative System can significantly improve the accuracy of data tracking.
They reduce the chances of human errors, such as miscounting or misplacing paper-based attendance
sheets.

2. Real-time tracking: Academic Administrative System allow for real-time searching. This means that
supervisors and administrators can instantly access data, making it easier to manage and address related
issues promptly.

3. Accessibility: With an Academic Administrative System, administrators can access records from
computer system. This makes it more convenient for everyone involved.

4. Automation: Academic Administrative System can automate many related tasks, such as generating
fees of students, structures, generating reports, and calculating percentages. This saves time and
reduces the administrative burden.

5. Data analysis: Academic Administrative System data collected through an online system can be
analyzed to identify trends and patterns. This can help in making informed decisions regarding
interventions and improvements.

6. Security: Academic Administrative System can provide enhanced security features, such as user
authentication and encryption, to protect attendance data from unauthorized access and tampering.
7. Integration: Academic Administrative System can be integrated with other systems, such as student
information systems or software, streamlining data management and reducing redundancy.

8. Remote work or distance learning: In situations where employees or students are working or
studying remotely, an system is essential for tracking accurately their data.

9. Accountability: An Academic Administrative System can promote accountability among students


and Teachers, as they are aware that there is being monitored and recorded.

10. Cost-effectiveness: Over time, Academic Administrative System can be cost-effective as it reduces
the need for physical sheets, storage space, and administrative work associated with system tracking.

11. Compliance: Some organizations, such as educational institutions, may be required to maintain
records for compliance or reporting purposes. A system can help in meeting these requirements more
efficiently.

12. Customization: Academic Administrative System can often be customized to meet the specific
needs of an organization or institution, allowing for tailored solutions.

Overall, Academic Administrative System can provide numerous benefits in terms of accuracy,
efficiency, and data management, making it a valuable tool for various types of organizations.

1.3 Operating Environment Hardware and Software

The Academic Administrative System shall function on the PC provided by the system. This entails the
system to operate on the Windows CE platform. The Academic Administrative System shall interface
between Windows CE designated to store the records.

The Web Server and Database Software have not been established at this point. The Academic
Administrative System will record all the essentials details of each User related data. Pentium 3.0 GHz
or higher RAM must be 1 Gb or more and Hard disk.

SOFTWARE SPECIFICATION

• Operating system: Microsoft windows 11/10/7.


• Integrated Development Environment: Netbeans
• MySQL Command Line Client
• Programming language: JAVA (Swing & AWT)
HARDWARE SPECIFICATION

• System type: 64-bit Operating System, x64-bassed processor.


• Installed memory (RAM):8.00 GB (7.43 GB Usable)
• Total size of Hard disk: 1 TB
PROPOSED
SYSTEM

2.1 Proposed System (Introduction of system)

The new system will automate the whole working of institute. In this project we will retrieve the
information of student or update the information easily using computer. If any new student come into
the institute for admission all the information regarding the student and in which course, he/ she wants
to take admission or what the roll no given to the student all the information is stored into the database.
we can easily retrieve, changed, updated, or saved the information whenever we want. Information
regarding the teachers or non-teaching staff are also in this project. Here we will manage their
examination marks with their respective subjects. Checks courses fess structure. Fine of the student is
also calculated using computer from the attendance chart. Managing the funds of students by monthly
basis or semester basis.

Proposed System is built with technique i.e., java with MySQL. Proposed system is very fast, easily,
and efficient system.

The proposed system is also less dependent on employees. It works without any help of employees. The
whole software is automatic. The entire software is full of photographs of all topics categorized under
different groups.

The landscape of education has undergone a significant transformation in recent years, with technology
playing a pivotal role in shaping the way educational institutions operate. The traditional methods of
administrative tasks within educational organizations have proven to be increasingly inefficient and
cumbersome. In response to these challenges, the development of an Academic Administration System
(AAS) has become a critical imperative for educational institutions worldwide.

This project aims to provide a comprehensive description of the Academic Administration System, its
significance, components, functionalities, and the potential benefits it offers to educational institutions.
In an era where efficiency, data-driven decision-making, and adaptability are paramount, an effective
AAS stands as a fundamental cornerstone for educational administrators and staff.

The System of Academic Administration System, often referred to as SAAS, is a comprehensive


software solution designed to streamline and enhance the management and operation of academic
institutions. In this project description, we will delve into the key components, objectives,
functionalities, and benefits of the SAAS project, providing an in-depth overview of its significance in
modern education.

Education has always been a cornerstone of societal development, and academic institutions play a
pivotal role in imparting knowledge and skills to the future workforce. However, the traditional
administrative processes in these institutions have been plagued by inefficiencies, leading to resource
wastage, delays, and errors. The System of Academic Administration System aims to address these
challenges by leveraging technology to optimize and automate various administrative tasks.
2.2 Module specifications (Scope)
The scope of an Academic Administration System project is a critical aspect that defines the
boundaries, objectives, and deliverables of the project. In this description, we cover all aspect as well as
specification of system.

An Academic Administration System project aims to design, develop, and implement a comprehensive
software solution to streamline and enhance the administrative functions of an educational institution.
This project covers the entire scope of activities necessary for the successful management of an
academic institution, including student management, course management, faculty management,
financial management, library management, communication and collaboration tools, data analytics,
security, and compliance.

1) Saving of man power:


Due to computerization, there is consideration saving in manpower and time because all billing related
activities are carried out automatically.

2) Accuracy and efficiency:


No wrong data is possible because of the validation checks by system.

3) Early and correct decision making:


Because of fast communication, report making procedure is simplified and fast.

4) Immediate response to problems:


Due to computerization the problems which are related to billing can be reduced.

5) Advantages of computerization:
To overcome limitation of existing system, computerization is correct choice of computer in any field
and it reduce the time required to do a particular job.

2.3 Objectives of System


The objective is to design a system that can integrate all the above features in a single system, so that it
can be easy to use. The new system should have all the records and files of the old system in a
comprehensively linked manner so that whenever we want to retrieve some information, it can be done
in an efficient manner.
The system should be a one-step shop solution where all the different jobs regarding the various
operations and functions in the centers can be done on a single window with least hassle. That is, the
new system should be able to do work in the least amount of time and with much more efficiency and
effectiveness than the existing system.

The designing aspects of new system should be aimed towards basing all the data fields and data
records in a single database, from where any operation on the data or data retrieval can be done easily.
It should be designed in such a way that only the required information is displayed when asked for.

Not like the manual system where one has to search in hard copy files to look for a particular record.

It should remove, if not all majority of the problems that exists in the old system. Also it should be
compatible, easy to understand and easy to modify.

The aim would be to remove as many problems as possible from the existing system and design the
new system in such a manner that it looks a very comprehensive approach to the stated objectives. The
organization structure of the old system should be clearly understood so that the objectives it aims to
achieve can be designed.

There should be complete interaction between the various sub-systems of the main system so that there
can be efficient functioning of the system.

Every component of the system should be able to interact with other components through a common
interface. There should be such an interaction interface, that if one component wants the output from
other sub- system then it can do so freely and without hindrance.

Also all sub-systems should be interdependent on each other and also independent, it means that
whenever some sub-system wants some information from other sub-system, it can do so without any
problem, also when a system functions independently then it does not have to wait for data to be
processed. All the sub-systems should be performing the designed operations on the given data in a
comprehensive manner so that all of them are aimed towards achieving a common goal.
The main objectives of the new system are mentioned below: -

1. Fast and Efficient: - As compared to existing system, in new system the user can get the information
fast, easily, and efficiently from the software.

2. Reliable and accurate: -As in new system, the information is stored and processed in computers so
that data will be more reliable and accurate.

3. Centralized Data: -In the existing system, data records are kept under file maintenance system due to
this system the placement of the data is not at one place. But in new system, each record is maintained
on computer, which leads to the centralization of data.

4. Non-Redundant Information: As in proposed system data is maintained on the computers so


inconsistency does not occur which will never lead to problem like duplication of data.

5. Easy to Access: -As compared to existing system, in new system the users can easily and efficiently
accesses the information from the computer.
ANALYSIS &
DESIGN

3.1 Admin use case diagram

Teacher
New Information
S Student
Details
S Teacher

Apply leave
S Student

examination

Fee’s Details

Update details

admin
Marks

Check Result

Exit

3.2 Activity Diagram

start

LL Admin Login
no yes

valid

Add teacher B View V Apply Examination D Fees


and student details Leave/Leave Details
information detail

A insert /check
student marks
add/Update/print
Yes NO
detail

valid

LL Logout

end

3.3 class diagram

Admin New Information


User _name New_faculty()
password New_Student
Update() ( add()
Delete() Update()
Delete()

View information Apply Leave

Student_Name Student_Leave
Student_Rollno Teacher_Leave
Student_DOB
Student_Id
Status()
Print() Search()
Search()

Examination Fees Utility

Subject_Marks Course_Fees
Student_Rollno Student_BalanceFees Calculator
Student_Name Student_FeeDetails Browers

Print() Update() Calculate()


Search() Search() Search()

3.4 E-R Diagram


ER Diagram stands for Entity Relationship Diagram, also known as ERD is a diagram that displays
the relationship of entity sets stored in a database. In other words, ER diagrams help to explain the
logical structure of databases. ER diagrams are created based on three basic concepts: entities,
attributes and relationships.ER Diagrams contain different symbols that use rectangles to represent
entities, ovato define attributes and diamond shapes to represent relationships.

3.5 sequence diagram


Login success Student/Teacher Examination Fees Details Apply leave &
details add new details

Add/edit add/edit add/edit


Login
To
page
delete/update

save/
update

Manage
student/
Teacher
details

Manage
students
marks

Manage
Fees
details

Manage
Leave
application
& add new
details

3.6 Module Hierarchy Diagram


Admin

Teacher Course Student

View View
information information

Add Faculty Add Student Apply Leave


Apply Leave

Examination Fees Structure

Subjects Marks

3.7 Database Dictionary:


Login Table: Account table consists five attributes which are Username, Name, Password,
Sec_ques, Sec_ans. Username is used as Primary key.
Desc account;

STUDENT TABLE
Student table :Student table is used to add the details of new student like
Name,phoneno.,DoB,course,Branch etc...Phoneno. ,E-mail and Aadhar are used as Primary
key.

Desc student;

Teacher TABLE
Teacher table: Teacher table is used to add the details of new student like Name, phoneno.,DoB,
course,Branch etc...Phoneno. ,E-mail and Aadhar are used as Primary key.
Desc teacher;
SUBJECT TABLE

Subject table : Subject table is used to add the subjects of the student in that particular sem
with the attributes like rollno and five subjects.

Desc Subject;
MARKS TABLE

Marks table :Marks table is used to add the marks of the particular subjects of the student in
a particular sem and the attributes used are rollno and five subject marks.

Desc Marks;
FEE TABLE

Fee table:fee table is used to pay the fee dues of the student for that particular sem and the
attributes used like rollno, name, fathersname, course, branch, sem and fee_paid.

Desc Fee;
User manual

4.1 User interface Screen(Input) : -


4.2 Output Screens with data : -
4.3 Data Reports : -
1.Login page :- login page has username and password. Username varchar(20), Password varchar(20) valid
User name and password admin perform further exectution.
2.Home page user : This page shows us what user can see and access. He can add,
remove, update and upload the data. He can logout from the website in homepage.

Home page user


3.Student form : In this we can add the new student details which will be stored in back end of
user.This details further can updated in the update page.

Student form
4.Teacher form: In this we can add the new teacher details which will be stored in back end of
user.This details further can updated in the update page.

Teacher form
5.Marks and Subject page : In this page we can enter the subjects and marks scored in that
particular subject along the roll no.

Marks and Subject page


6.Fee payment page : In this page we can the pay the fee dues of the particular student which
uses roll no, course, branch and Sem to pay the fee.

Fee payment page


7. Examination: -
New Student Admission Added : -
Apply Leave For Student: -
Student Fees Updates : -
Student Fees Structure : -
4.4 Test procedure and cases

Actual Expected
Test No. Test Name input Status
output output
User is User is
Username and
1 successfully successfully
Login password Pass
Authenticated Authenticated
Wrong Invalid Invalid
2 username and username or username or
Login Pass
password password password
User details Account Account
3 and successfully successfully
Signup Pass
passsword created created
Details of the Student Student
4 student inserted inserted
Student Pass
required. successfully successfully
Details of the Teacher Teacher
5 teacher inserted inserted
Teacher Pass
required successfully successfully
Enter the
subject names
Subjects Subjects
6 and marks
Subject entered entered Pass
along with
successfully successfully
rollno
Details and Paid Paid
7
Fee fee_paid successfully successfully Pass
Enter rollno
Remove Removed Removed
8 and click on
Student successfully successfully Pass
remove
Remove Enter emp_id Teacher Teacher
9 Teacher and click on removed removed
Pass
remove successfully successfully
Logout Logout
10 Exit Click on Exit
successfully successfully Pass
4.5 Sample program code

Package institution.management.system;

importjava.awt.*;

importjavax.swing.*;

importjava.awt.event.*;

importjava.sql.*;

importinstitution.management.system.Signup;

public class Login extends JFrame implements ActionListener{

privateJPanel panel;

privateJTextFieldtextField;

privateJPasswordFieldpasswordField;

privateJButton b1,b2,b3;

public Login() {

setBackground(new Color(169, 169, 169));

setBounds(600, 300, 600, 400);

panel = new JPanel();

panel.setBackground(new Color(176, 224, 230));

setContentPane(panel);

panel.setLayout(null);

JLabel l1 = new JLabel("Username : ");

l1.setBounds(124, 89, 95, 24);


panel.add(l1);

JLabel l2 = new JLabel("Password : ");

l2.setBounds(124, 124, 95, 24);

panel.add(l2);

textField = new JTextField();

textField.setBounds(210, 93, 157, 20);

panel.add(textField);

passwordField = new JPasswordField();

passwordField.setBounds(210, 128, 157, 20);

panel.add(passwordField);

JLabel l3 = new JLabel("");

l3.setBounds(377, 79, 46, 34);

panel.add(l3);

JLabel l4 = new JLabel("");

l4.setBounds(377, 124, 46, 34);

panel.add(l3);

b1 = new JButton("Login");

b1.addActionListener(this);

b1.setForeground(new Color(46, 139, 87));

b1.setBackground(new Color(250, 250, 210));

b1.setBounds(149, 181, 113, 39);

panel.add(b1);

b2 = new JButton("SignUp");

b2.addActionListener(this);
b2.setForeground(new Color(139, 69, 19));

b2.setBackground(new Color(255, 235, 205));

b2.setBounds(289, 181, 113, 39);

panel.add(b2);

b3 = new JButton("Forgot Password");

b3.addActionListener(this);

b3.setForeground(new Color(205, 92, 92));

b3.setBackground(new Color(253, 245, 230));

b3.setBounds(199, 231, 179, 39);

panel.add(b3);

JLabel l5 = new JLabel("Trouble in Login?");

l5.setFont(new Font("Tahoma", Font.PLAIN, 15));

l5.setForeground(new Color(255, 0, 0));

l5.setBounds(70, 240, 130, 20);

panel.add(l5);

JPanel panel2 = new JPanel();

panel2.setBackground(new Color(176, 224, 230));

panel2.setBounds(24, 40, 434, 263);

panel.add(panel2);

public void actionPerformed(ActionEventae){

if(ae.getSource() == b1){

Boolean status = false;

try {
conn con = new conn();

String sql = "select * from account where username=? and password=?";

PreparedStatementst = con.c.prepareStatement(sql);

st.setString(1, textField.getText());

st.setString(2, passwordField.getText());

ResultSetrs = st.executeQuery();

if (rs.next()) {

this.setVisible(false);

new Loading().setVisible(true);

} else

JOptionPane.showMessageDialog(null, "Invalid Login...!.");

} catch (Exception e2) {

e2.printStackTrace();} }

if(ae.getSource() == b2){

setVisible(false);

Signup su = new Signup();

su.setVisible(true);}

if(ae.getSource() == b3){

setVisible(false);

ForgotPassword forgot = new ForgotPassword();

forgot.setVisible(true);}

public static void main(String[] args) {

new Login().setVisible(true); } }
package acedemic.adminstrative.system;

import java.awt.*;
import javax.swing.*;
import java.sql.*;
import net.proteanit.sql.DbUtils;
import java.awt.event.*;

public class ExaminationDetails extends JFrame implements ActionListener {

JTextField search;
JButton submit, cancel;
JTable table;

ExaminationDetails() {
setSize(1000, 475);
setLocation(300, 100);
setLayout(null);

getContentPane().setBackground(Color.WHITE);

JLabel heading = new JLabel("Check Result");


heading.setBounds(80, 15, 400, 50);
heading.setFont(new Font("Tahoma", Font.BOLD, 24));
add(heading);

search = new JTextField();


search.setBounds(80, 90, 200, 30);
search.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(search);

submit = new JButton("Result");


submit.setBounds(300, 90, 120, 30);
submit.setBackground(Color.BLACK);
submit.setForeground(Color.WHITE);
submit.addActionListener(this);
submit.setFont(new Font("Tahoma", Font.BOLD, 15));
add(submit);

cancel = new JButton("Back");


cancel.setBounds(440, 90, 120, 30);
cancel.setBackground(Color.BLACK);
cancel.setForeground(Color.WHITE);
cancel.addActionListener(this);
cancel.setFont(new Font("Tahoma", Font.BOLD, 15));
add(cancel);

table = new JTable();


table.setFont(new Font("Tahoma", Font.PLAIN, 16));

JScrollPane jsp = new JScrollPane(table);


jsp.setBounds(0, 130, 1000, 310);
add(jsp);

try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from student");
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}

table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent me) {
int row = table.getSelectedRow();
search.setText(table.getModel().getValueAt(row, 2).toString());
}
});

setVisible(true);
}

public void actionPerformed(ActionEvent ae) {


if (ae.getSource() == submit) {
setVisible(false);
new Marks(search.getText());
} else {
setVisible(false);
}
}

public static void main(String[] args) {


new ExaminationDetails();
}
}

package acedemic.adminstrative.system;

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

@SuppressWarnings("serial")
public class UpdateStudent extends JFrame implements ActionListener{

JTextField tfcourse, tfaddress, tfphone, tfemail, tfbranch;


JLabel labelrollno;
JButton submit, cancel;
Choice crollno;

UpdateStudent() {
setSize(900, 650);
setLocation(350, 50);

setLayout(null);

JLabel heading = new JLabel("Update Student Details");


heading.setBounds(50, 10, 500, 50);
heading.setFont(new Font("Tahoma", Font.ITALIC, 35));
add(heading);

JLabel lblrollnumber = new JLabel("Select Roll Number");


lblrollnumber.setBounds(50, 100, 200, 20);
lblrollnumber.setFont(new Font("serif", Font.PLAIN, 20));
add(lblrollnumber);

crollno = new Choice();


crollno.setBounds(250, 100, 200, 20);
add(crollno);

try {
Conn c = new Conn();
ResultSet rs = c.s.executeQuery("select * from student");
while(rs.next()) {
crollno.add(rs.getString("rollno"));
}
} catch (Exception e) {
e.printStackTrace();
}

JLabel lblname = new JLabel("Name");


lblname.setBounds(50, 150, 100, 30);
lblname.setFont(new Font("serif", Font.BOLD, 20));
add(lblname);

JLabel labelname = new JLabel();


labelname.setBounds(200, 150, 150, 30);
labelname.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelname);

JLabel lblfname = new JLabel("Father's Name");


lblfname.setBounds(400, 150, 200, 30);
lblfname.setFont(new Font("serif", Font.BOLD, 20));
add(lblfname);

JLabel labelfname = new JLabel();


labelfname.setBounds(600, 150, 150, 30);
labelfname.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelfname);

JLabel lblrollno = new JLabel("Roll Number");


lblrollno.setBounds(50, 200, 200, 30);
lblrollno.setFont(new Font("serif", Font.BOLD, 20));
add(lblrollno);

labelrollno = new JLabel();


labelrollno.setBounds(200, 200, 200, 30);
labelrollno.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelrollno);

JLabel lbldob = new JLabel("Date of Birth");


lbldob.setBounds(400, 200, 200, 30);
lbldob.setFont(new Font("serif", Font.BOLD, 20));
add(lbldob);

JLabel labeldob = new JLabel();


labeldob.setBounds(600, 200, 150, 30);
labeldob.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labeldob);

JLabel lbladdress = new JLabel("Address");


lbladdress.setBounds(50, 250, 200, 30);
lbladdress.setFont(new Font("serif", Font.BOLD, 20));
add(lbladdress);

tfaddress = new JTextField();


tfaddress.setBounds(200, 250, 150, 30);
add(tfaddress);

JLabel lblphone = new JLabel("Phone");


lblphone.setBounds(400, 250, 200, 30);
lblphone.setFont(new Font("serif", Font.BOLD, 20));
add(lblphone);

tfphone = new JTextField();


tfphone.setBounds(600, 250, 150, 30);
add(tfphone);

JLabel lblemail = new JLabel("Email Id");


lblemail.setBounds(50, 300, 200, 30);
lblemail.setFont(new Font("serif", Font.BOLD, 20));
add(lblemail);

tfemail = new JTextField();


tfemail.setBounds(200, 300, 150, 30);
add(tfemail);

JLabel lblx = new JLabel("Class X (%)");


lblx.setBounds(400, 300, 200, 30);
lblx.setFont(new Font("serif", Font.BOLD, 20));
add(lblx);

JLabel labelx = new JLabel();


labelx.setBounds(600, 300, 150, 30);
labelx.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelx);

JLabel lblxii = new JLabel("Class XII (%)");


lblxii.setBounds(50, 350, 200, 30);
lblxii.setFont(new Font("serif", Font.BOLD, 20));
add(lblxii);

JLabel labelxii = new JLabel();


labelxii.setBounds(200, 350, 150, 30);
labelxii.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelxii);

JLabel lblaadhar = new JLabel("Aadhar Number");


lblaadhar.setBounds(400, 350, 200, 30);
lblaadhar.setFont(new Font("serif", Font.BOLD, 20));
add(lblaadhar);

JLabel labelaadhar = new JLabel();


labelaadhar.setBounds(600, 350, 150, 30);
labelaadhar.setFont(new Font("Tahoma", Font.PLAIN, 18));
add(labelaadhar);

JLabel lblcourse = new JLabel("Course");


lblcourse.setBounds(50, 400, 200, 30);
lblcourse.setFont(new Font("serif", Font.BOLD, 20));
add(lblcourse);

tfcourse = new JTextField();


tfcourse.setBounds(200, 400, 150, 30);
add(tfcourse);

JLabel lblbranch = new JLabel("Branch");


lblbranch.setBounds(400, 400, 200, 30);
lblbranch.setFont(new Font("serif", Font.BOLD, 20));
add(lblbranch);

tfbranch = new JTextField();


tfbranch.setBounds(600, 400, 150, 30);
add(tfbranch);

try {
Conn c = new Conn();
String query = "select * from student where rollno='"+crollno.getSelectedItem()+"'";
ResultSet rs = c.s.executeQuery(query);
while(rs.next()) {
labelname.setText(rs.getString("name"));
labelfname.setText(rs.getString("fname"));
labeldob.setText(rs.getString("dob"));
tfaddress.setText(rs.getString("address"));
tfphone.setText(rs.getString("phone"));
tfemail.setText(rs.getString("email"));
labelx.setText(rs.getString("class_x"));
labelxii.setText(rs.getString("class_xii"));
labelaadhar.setText(rs.getString("aadhar"));
labelrollno.setText(rs.getString("rollno"));
tfcourse.setText(rs.getString("course"));
tfbranch.setText(rs.getString("branch"));
}
} catch (Exception e) {
e.printStackTrace();
}

crollno.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent ie) {
try {
Conn c = new Conn();
String query = "select * from student where rollno='"+crollno.getSelectedItem()+"'";
ResultSet rs = c.s.executeQuery(query);
while(rs.next()) {
labelname.setText(rs.getString("name"));
labelfname.setText(rs.getString("fname"));
labeldob.setText(rs.getString("dob"));
tfaddress.setText(rs.getString("address"));
tfphone.setText(rs.getString("phone"));
tfemail.setText(rs.getString("email"));
labelx.setText(rs.getString("class_x"));
labelxii.setText(rs.getString("class_xii"));
labelaadhar.setText(rs.getString("aadhar"));
labelrollno.setText(rs.getString("rollno"));
tfcourse.setText(rs.getString("course"));
tfbranch.setText(rs.getString("branch"));
}
} catch (Exception e) {
e.printStackTrace();
}
}
});

submit = new JButton("Update");


submit.setBounds(250, 500, 120, 30);
submit.setBackground(Color.BLACK);
submit.setForeground(Color.WHITE);
submit.addActionListener(this);
submit.setFont(new Font("Tahoma", Font.BOLD, 15));
add(submit);

cancel = new JButton("Cancel");


cancel.setBounds(450, 500, 120, 30);
cancel.setBackground(Color.BLACK);
cancel.setForeground(Color.WHITE);
cancel.addActionListener(this);
cancel.setFont(new Font("Tahoma", Font.BOLD, 15));
add(cancel);
setVisible(true);
}

public void actionPerformed(ActionEvent ae) {


if (ae.getSource() == submit) {
String rollno = labelrollno.getText();
String address = tfaddress.getText();
String phone = tfphone.getText();
String email = tfemail.getText();
String course = tfcourse.getText();
String branch = tfbranch.getText();

try {
String query = "update student set address='"+address+"', phone='"+phone+"',
email='"+email+"', course='"+course+"', branch='"+branch+"' where rollno='"+rollno+"'";
Conn con = new Conn();
con.s.executeUpdate(query);

JOptionPane.showMessageDialog(null, "Student Details Updated Successfully");


setVisible(false);
} catch (Exception e) {
e.printStackTrace();
}
} else {
setVisible(false);
}
}

public static void main(String[] args) {


new UpdateStudent();
}
}

4.6 References and Bibliography : -

Books and Websites:


 Internet & World Wide Web: How to Program Deitel, PJ Deitel.
 Code for Interview YouTube Channel.
 Database System Concepts, by Silberschatz, Sudarshan, and Korth.
 Fundamentals of Database Systems, RamezElmasri and Shamkant B. Navathe, 7th
Edition. 2017, Pearson

You might also like