Mini-Project Report
On
“Student Result Management System”
Submitted for the partial fulfilment of Fifth Semester subject “Advance Java”
Course code: CM302G$
Submitted by: -
Harshdeep Kaur Bamrah- 2213004
Under the Guidance of
Mr. S. A. Khatri
Lecturer Department of Computer Engineering
ODD-2024
Department of Computer Engineering
Government Polytechnic, Nagpur
(An Autonomous Institute of Government of Maharashtra)
1
Certificate
This is certified that the Mini Project titled
“Student Result Management System”
Carried out under guidance of
Mr. S. A. Khatri
Department of Computer Engineering
Submitted by:
Harshdeep Kaur Bamrah- 2213004
As the partial fulfilment of Fifth Semester subject “ADVANCE JAVA” Course code
CM302G$ during the term ODD-24
Mr. S. A. Khatri Dr. M. V Sarode
Guide and Lecturer Head of Department
Department of Computer Engineering Department of Computer Engineering
ODD-24
Department of Computer Engineering
Government Polytechnic, Nagpur
(An Autonomous Institute of Government of Maharashtra)
2
INDEX
Sr. no. Topic Page no.
1. Acknowledgment 4
2. Introduction to Topic 5
3. Program 6
4. Output 14
3
ACKNOWLEGEMENT
We would like to place on record our deep sense of gratitude to our guide, Mr.
S. A. Khatri Department of Computer Engineering for his generous guidance, helpful
and useful suggestions, continuous encouragement and supervision throughout the
course of present work.
We express our sincere gratitude to Dr. M. V SARODE, Head of Department of
Computer Engineering for his stimulating guidance. The success of any work depends
on efforts of many individuals. We would like to take this opportunity to express out
deep gratitude to all those who extended their support and have guided us to complete
this project work.
We are extremely thankful to Dr. R. P MOGRE, Principal for providing us
infrastructural facilities work in, without which this work would not have been possible.
4
INTRODUCTION
“Student Result Management System” is a software application designed to streamline and
simplify the process of managing student information, courses, and results in an educational
institution. This system provides a user-friendly interface for administrators, teachers, and staff
to handle student data efficiently.
Purpose of the System:
In any educational setup, managing student information, course details, and examination results
is a challenging and time-consuming process. The Student Result Management System
addresses these challenges by offering a robust platform that automates these tasks while
ensuring accuracy, security, and user convenience. This system is particularly beneficial for
schools, colleges, universities, and coaching institutes.
Key Features:
1. Course and Student Details Management:
o Add, edit, and view details of courses and enrolled students.
o Organized structure for maintaining academic records.
2. Result Processing:
o Manage and calculate results for students based on their performance.
o Ensure accurate and consistent grading.
3. Result Display:
o Display individual or batch-wise results.
o Easy access to performance reports for better analysis.
5
PROGRAM
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
public class MainPage {
public static void main(String[] args) {
JFrame frame = new JFrame("Student Result Management System");
[Link](null);
[Link](600, 400);
[Link](JFrame.EXIT_ON_CLOSE);
// Set a soft pastel background color
[Link]().setBackground(new Color(240, 248, 255)); // Alice Blue
// Title label
JLabel titleLabel = new JLabel("Student Result Management System",
[Link]);
[Link](new Font("Arial", [Link], 24));
[Link](Color.DARK_GRAY);
[Link](50, 20, 500, 40);
[Link](titleLabel);
// Course and Student Details Button
JButton btnCourseStudent = new JButton("Course and Student Details");
[Link](150, 80, 250, 50);
[Link](new Color(102, 205, 170)); // Medium sea green
[Link](new Font("Arial", [Link], 16));
// Result Button
JButton btnResult = new JButton("Result");
[Link](150, 150, 250, 50);
[Link](new Color(135, 206, 235)); // Sky Blue
[Link](new Font("Arial", [Link], 16));
// Display Result Button
JButton btnDisplayResult = new JButton("Display Result");
[Link](150, 220, 250, 50);
[Link](new Color(255, 165, 0)); // Orange
[Link](new Font("Arial", [Link], 16));
// Action listeners for buttons
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
new CourseStudentPage();
[Link](false);
6
}
});
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
new ResultPage();
[Link](false);
}
});
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
new DisplayResultPage();
[Link](false);
}
});
// Add buttons to frame
[Link](btnCourseStudent);
[Link](btnResult);
[Link](btnDisplayResult);
[Link](true);
}
}
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
public class CourseStudentPage {
JFrame frame = new JFrame("Course and Student Details");
public CourseStudentPage() {
[Link](null);
[Link](600, 400);
[Link](JFrame.EXIT_ON_CLOSE);
// Set background color
[Link]().setBackground(new Color(240, 248, 255)); // Alice blue
// Title label
JLabel titleLabel = new JLabel("Enter Course and Student Details", [Link]);
[Link](new Font("Arial", [Link], 20));
[Link](Color.DARK_GRAY);
[Link](50, 20, 500, 40);
[Link](titleLabel);
7
// Student ID
JLabel lblStudentId = new JLabel("Student ID:");
[Link](50, 80, 150, 30);
[Link](lblStudentId);
JTextField txtStudentId = new JTextField();
[Link](200, 80, 200, 30);
[Link](txtStudentId);
// Course Name
JLabel lblCourse = new JLabel("Course Name:");
[Link](50, 120, 150, 30);
[Link](lblCourse);
JTextField txtCourse = new JTextField();
[Link](200, 120, 200, 30);
[Link](txtCourse);
// Student Name
JLabel lblStudentName = new JLabel("Student Name:");
[Link](50, 160, 150, 30);
[Link](lblStudentName);
JTextField txtStudentName = new JTextField();
[Link](200, 160, 200, 30);
[Link](txtStudentName);
// Save Button with Background Color
JButton btnSave = new JButton("Save");
[Link](150, 200, 100, 50);
[Link](new Color(50, 205, 50)); // Lime green
[Link](new Font("Arial", [Link], 16));
[Link](btnSave);
// Clear Button with Red Background Color
JButton btnClear = new JButton("Clear");
[Link](300, 200, 100, 50);
[Link]([Link]); // Red color for Clear button
[Link](new Font("Arial", [Link], 16));
[Link](btnClear);
// Action listener for Save button
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveCourseStudentDetails([Link](), [Link](),
[Link]());
}
});
8
// Action listener for Clear button
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
// Clear all fields
[Link]("");
[Link]("");
[Link]("");
}
});
[Link](true);
}
// Method to save course and student details to MySQL
private void saveCourseStudentDetails(String studentId, String courseName, String
studentName) {
try (Connection conn =
[Link]("jdbc:mysql://localhost:3306/studentdb", "root", "root");
PreparedStatement stmt = [Link]("INSERT INTO CourseStudent
(student_id, student_name, course_name) VALUES (?, ?, ?)")) {
// Insert student and course details into the same table
[Link](1, studentId);
[Link](2, studentName);
[Link](3, courseName);
[Link]();
[Link](frame, "Course and Student Details Saved!");
} catch (SQLException ex) {
[Link](frame, "Error saving details: " + [Link]());
}
}
public static void main(String[] args) {
new CourseStudentPage();
}
}
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
public class ResultPage {
JFrame frame = new JFrame("Result Entry");
public ResultPage() {
[Link](null);
9
[Link](600, 400);
[Link](JFrame.EXIT_ON_CLOSE);
// Set background color
[Link]().setBackground(new Color(255, 255, 240)); // Light yellow
// Title label
JLabel titleLabel = new JLabel("Add Student Result", [Link]);
[Link](new Font("Arial", [Link], 20));
[Link](Color.DARK_GRAY);
[Link](150, 20, 300, 40);
[Link](titleLabel);
// Student ID
JLabel lblStudentId = new JLabel("Student ID:");
[Link](50, 80, 150, 30);
[Link](lblStudentId);
JTextField txtStudentId = new JTextField();
[Link](200, 80, 200, 30);
[Link](txtStudentId);
// Course Name
JLabel lblCourse = new JLabel("Course Name:");
[Link](50, 120, 150, 30);
[Link](lblCourse);
JTextField txtCourse = new JTextField();
[Link](200, 120, 200, 30);
[Link](txtCourse);
// Marks
JLabel lblMarks = new JLabel("Marks:");
[Link](50, 160, 150, 30);
[Link](lblMarks);
JTextField txtMarks = new JTextField();
[Link](200, 160, 200, 30);
[Link](txtMarks);
// Save Result Button
JButton btnSaveResult = new JButton("Save Result");
[Link](150, 220, 150, 50);
[Link](new Color(255, 69, 0)); // Red-Orange
[Link](new Font("Arial", [Link], 16));
[Link](btnSaveResult);
// Clear Button with Green Background
JButton btnClear = new JButton("Clear");
[Link](320, 220, 100, 50);
10
[Link](new Color(34, 139, 34)); // Green color for Clear button
[Link](new Font("Arial", [Link], 16));
[Link](btnClear);
// Action listener for Save Result button
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveResult([Link](), [Link](), [Link]());
}
});
// Action listener for Clear button
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
// Clear all fields
[Link]("");
[Link]("");
[Link]("");
}
});
[Link](true);
}
// Method to save result into MySQL database
private void saveResult(String studentId, String courseName, String marks) {
try (Connection conn =
[Link]("jdbc:mysql://localhost:3306/studentdb", "root", "root");
PreparedStatement stmt = [Link]("INSERT INTO ResultPage
(student_id, course_name, marks) VALUES (?, ?, ?)")) {
// Insert student result into the database
[Link](1, studentId);
[Link](2, courseName);
[Link](3, marks);
[Link]();
[Link](frame, "Student Result Saved!");
} catch (SQLException ex) {
[Link](frame, "Error saving result: " + [Link]());
}
}
public static void main(String[] args) {
new ResultPage();
}
}
11
[Link]
import [Link].*;
import [Link].*;
import [Link].*;
import [Link].*;
public class DisplayResultPage {
JFrame frame = new JFrame("Display Student Result");
public DisplayResultPage() {
[Link](null);
[Link](600, 400);
[Link](JFrame.EXIT_ON_CLOSE);
// Set background color
[Link]().setBackground(new Color(240, 248, 255)); // Alice blue
// Title label
JLabel titleLabel = new JLabel("Student Result", [Link]);
[Link](new Font("Arial", [Link], 20));
[Link](Color.DARK_GRAY);
[Link](50, 20, 500, 40);
[Link](titleLabel);
// Student ID
JLabel lblStudentId = new JLabel("Student ID:");
[Link](50, 80, 150, 30);
[Link](lblStudentId);
JTextField txtStudentId = new JTextField();
[Link](200, 80, 200, 30);
[Link](txtStudentId);
// Course Name
JLabel lblCourse = new JLabel("Course Name:");
[Link](50, 120, 150, 30);
[Link](lblCourse);
JTextField txtCourse = new JTextField();
[Link](200, 120, 200, 30);
[Link](txtCourse);
// Display Result Button with Background Color
JButton btnDisplay = new JButton("Display Result");
[Link](150, 200, 150, 50);
[Link](new Color(50, 205, 50)); // Lime green
[Link](new Font("Arial", [Link], 16));
[Link](btnDisplay);
// Action listener for Display button
12
[Link](new ActionListener() {
public void actionPerformed(ActionEvent e) {
displayStudentResult([Link](), [Link]());
}
});
[Link](true);
}
// Method to display student result
private void displayStudentResult(String studentId, String courseName) {
try (Connection conn =
[Link]("jdbc:mysql://localhost:3306/studentdb", "root", "root");
PreparedStatement stmt = [Link]("SELECT marks FROM
ResultPage WHERE student_id = ? AND course_name = ?")) {
// Set the parameters for the query
[Link](1, [Link](studentId)); // Parse studentId to INT
[Link](2, courseName);
// Execute the query
ResultSet rs = [Link]();
if ([Link]()) {
int marks = [Link]("marks");
// Display the result in a message dialog
[Link](frame, "Marks for Student ID " + studentId + "
in course " + courseName + ": " + marks);
} else {
[Link](frame, "No result found for Student ID " +
studentId + " in course " + courseName);
}
} catch (SQLException ex) {
[Link](frame, "Error fetching result: " + [Link]());
}
}
public static void main(String[] args) {
new DisplayResultPage();
}
}
13
OUTPUT
Main Page:
Course and Student Page:
14
Result Page:
Display Result Page:
15
Conclusion:
The Student Result Management System simplifies academic data management by automating
student records, course details, and result processing. Its user-friendly interface, accuracy, and
scalability make it a valuable tool for educational institutions, enhancing efficiency and
decision-making.
Result:
Hence, we have successfully implemented a Student Result Management System in Java. The
system improves efficiency by reducing manual tasks, ensures accurate result calculations, and
provides organized access to academic records, fostering better transparency and performance
tracking.
16