Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

java correct project

The document is a micro project report on a 'Student Management System' submitted by students at S.S.M. Adsul Polytechnic College for their Diploma in Computer Engineering. It outlines the project's aim, benefits, methodology, and course outcomes, emphasizing Java programming concepts and database interactions. The report includes acknowledgments, an index, and sections detailing the implementation and features of the system, along with source code examples.

Uploaded by

kartikgagare099
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

java correct project

The document is a micro project report on a 'Student Management System' submitted by students at S.S.M. Adsul Polytechnic College for their Diploma in Computer Engineering. It outlines the project's aim, benefits, methodology, and course outcomes, emphasizing Java programming concepts and database interactions. The report includes acknowledgments, an index, and sections detailing the implementation and features of the system, along with source code examples.

Uploaded by

kartikgagare099
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

A

MICRO PROJECT REPORT ON

“Student Management System”


Program & Program code : CO-5-I

Course :JPR

Course code : 314317

Submitted by,

Name of student Enrollment no Program

1. PALLAVI BHAUSAHEB NAROTE 23611980155 CO-4K

2. SHAIKH SANIYA FIROJ 23611980143 CO-4K

3. RENVI BABASAHEB MORE 24611980212 CO-4K

Under the Guidance of


Prof. Palwe P.D.
In partial fulfillment of requirement for the award of
Diploma in Computer Engineering
MSBTE, Mumbai.
Academic Year: 2024-25

DEPARTMENT OF COMPUTER ENGINEERING

S.S.M. ADSUL POLYTECHNIC COLLEGE,

CHAS, AHMEDNAGAR -414 005(M.S)

1
DEPARTMENT OF COMPUTER ENGINEERING

S.S.M. ADSUL POLYTECHNIC COLLEGE,

CHAS, AHMEDNAGAR -414 005(M.S)

CERTIFICATE
This is to certify that the micro project report entitled
“Student Management System”

Submitted by,

Name of student Enrollment no Program

1. PALLAVI BHAUSAHEB NAROTE 23611980155 CO-4K

2. SHAIKH SANIYA FIROJ 23611980143 CO-4K

3. RENVI BABASAHEB MORE 23611980212 CO-4K

of semester IV institute, Sau. Sundarbai Manik Adsul Polytechnic, Chas,


Ahmednagar (code: 1464) has completed the micro project satisfactorily in
course (314317) for the Academic year 2024-25 as prescribed in the MSBTE
curriculum.

Place: Ahmednagar

Date: / /2024.

Prof. Palwe P.D. Prof. Hole P.P. Prof. Gadakh R.S.


(Micro Project Guide) (Head of Dept.) (Principal)

2
ACKNOWLEDGEMENT
We take this opportunity to acknowledge the constant encouragement and continuous help
given to us by our guide Prof. Palwe P.D. We convey our sincere thanks to her valuable timely
suggestion. We would also like to thanks principal Prof. Gadakh R.S. and Head of Computer
Department Prof. Hole P.P. We would also like to thank teaching staff of Computer
Department for helping us to achieve this goal. We are also thankful to those who directly or
indirectly helped us for completing this micro project. We would like to thank our parents
without whose supports; the completion of the micro project would not have been possible.

3
INDEX

SR NAME OF TOPIC PAGE


NO. NO.

PART PLAN – A

1.0 Aim/Benefits of Micro project 5

2.0 Course Outcomes 5

3.0 Proposed Methodology 5

4.0 Action Plan 6

5.0 Resource Required 6

PART PLAN - B

1.O Introduction to AJP 7

2.0 History of Java 7

3.0 Inheritance, Interface and Packages 7

4.0 Interacting with database 8

5.0 Features of Java 8

6.0 Basic Java Inheritance, Interface, package and database program 9

7.0 Source code 10

8.0 Output 17

9.0 Advantages & Features 19

10.0 Skills Developed 20

11.0 Actual Resources Used 21

12.0 Conclusion 21

4
PART PLAN – A

1.0 Aim /Benefits of microproject

“Student Management System”


• Java Mastery – Enhances your Java skills with concepts like exception handling,
encapsulation, and abstraction.
• SQL & Database Handling – Teaches how to work with MySQL, making database
management easier.
• Resume Enhancement – A great addition to your portfolio for job applications or
college projects.
• Expandable – You can add more functionalities like authentication, GUI, or reporting
features.
• Foundation for Larger Projects – Can be evolved into a full-fledged Student
Management System with additional modules.

2.0 Course Outcomes

• Object-Oriented Programming (OOP) – Uses inheritance and interfaces, reinforcing


key OOP principles.
• Database Connectivity – Helps you understand real-world JDBC operations like
inserting and retrieving data.
• Modularity & Organization – Demonstrates package structuring, making code
maintainable and scalable.
• Real-World Application – Mimics actual student management systems used in
institutions.

3.0 Proposed Methodology


• Requirement Analysis – Define student records, database interaction, and Java
concepts (inheritance, interfaces).
• System Design – Create database schema, class hierarchy (Student, GraduateStudent),
and an interface (StudentDAO).
• Implementation – Develop Java classes, connect to MySQL using JDBC, and perform
CRUD operations.
• Testing – Validate database interactions, exception handling, and program flow.

5
• Deployment & Enhancements – Convert to GUI, add features like grading,
authentication, and attendance tracking.

4.0 Action Plan

SR DETAIL OF ACTIVITY PLAN START PLAN NAME OF


NO DATE FINISH RESPONSIBLE TEAM
DATE MEMBER
1 Searching of topic for micro 25-02-2025 01-02-2025 Narote Pallavi
project.
2 Information collection from 02-03-2025 07-03-2025 Shaikh Saniya
internet and textbook.
3 Collect information from AJP 08-03-2025 16-03-2025 More Renvi
22517 reference book and
debugged the errors.
4 Arrange all the information in MS 17-03-2025 25-03-2025 Pallavi Narote
Word.
5 Prepare report on it using MS 26-03-2025 03-04-2025 Renvi More
Word.
6 Print micro project 04-04-2025 09-04-2025 Shaikh Saniya

5.0 Resource Required

Sr.no Name of the resources Specification Quantity


required

1. Computer system 16 GB RAM, windows 10 OS 1

2. Internet Youtube/any resource As required

3. Textbook AJP 1

6
PART PLAN – B

1.0 Introduction to JPR


JPR stands for “Java Programming”. Java is widely used programming language for coding web
applications. Java is a multi-platform object-oriented, and network-centric language that can
be used as a platform itself. It is fast, secure, reliable programming language. Java is a free-to-
use and a versatile language; it builds localized and distributed software. Some common uses
of java are Game development, Cloud computing, big data etc.

2.0 HISTORY OF JAVA

James Gosling, Mike Sheridan, Patrick Naughton, Chris Warth and Ed Frank initiated the Java
language project in June 1991 at Sun Microsystems. Java was originally designed for
interactive television but it was far advanced for the digital cable television industry at the
time. The language was initially called Oak after an oak tree that stood outside Goslings office.
Later the project went by the name Green and was finally renamed to Java, from Java coffee.
Gosling designed java with a C/C++style syntax that system and application programmers
would find familiar.
Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised
“Write Once, Run Anywhere” (WORA), providing no-cost run –times on popular platforms.
Fairly secure and featuring configurable security, it allowed network-and file-access
restrictions.

3.0 Inheritance, Interface and Packages


• Inheritance allows a child class to inherit properties and methods from a parent class,
promoting reusability and hierarchy.
• Interfaces define abstract methods that must be implemented by a class, enabling
multiple inheritance and contract-based programming.
• Packages help organize classes logically, preventing conflicts and improving
maintainability.
Inheritance, interfaces, and packages are essential concepts in Java that enhance code
organization, reusability, and scalability. Inheritance allows a child class to acquire the
properties and behaviour of a parent class, reducing redundancy and promoting hierarchical
relationships. For example, in a Student Management System, a class can extend the class,

7
inheriting common attributes like and . Interfaces provide a way to enforce consistency across
multiple implementations by defining methods that must be implemented by any class that
adopts them. In the project, the interface outlines database operations, ensuring different
database handlers conform to the same structure.
Packages help structure code by organizing related class es together, making large projects
more manageable and reducing naming conflicts. For instance, handles database operations,
defines student-related classes, and manages business logic.
These three principles—inheritance, interfaces, and packages—contribute to the efficiency,
modularity, and maintainability of Java-based applications, making the Student Management
System well-structured and scalable.

4.0 Interacting with database


Interacting with a database in Java requires the use of JDBC (Java Database Connectivity),
which facilitates communication between a Java application and relational databases like
MySQL. The process begins with loading the JDBC driver, followed by establishing a connection
to the database using . Once connected, Java programs can execute SQL queries using to
perform CRUD operations—inserting, retrieving, updating, and deleting records. The
ResultSet class allows efficient data retrieval, enabling applications to fetch and display stored
information dynamically. To prevent SQL injection, best practices include using parameterized
queries with . Additionally, proper exception handling with blocks ensures stability when
dealing with database connectivity issues. After executing queries, closing the connection via
is essential to free up resources and prevent memory leaks. By integrating inheritance,
interfaces, and packages, database operations can be structured efficiently, ensuring
modularity and scalability within applications like the Student Management System.

5.0 Features Of JAVA

1. Object-Oriented – Java follows the OOP principles, enabling modular, reusable, and
scalable code.
2. Platform-Independent – Java’s Write Once, Run Anywhere (WORA) capability allows
execution on different OS using the JVM (Java Virtual Machine).
3. Robust & Secure – Java includes exception handling and memory management
features, preventing crashes and vulnerabilities.
4. Multithreading – Supports concurrent execution of multiple tasks, making
applications faster and more efficient.
5. Automatic Garbage Collection – The Java Garbage Collector automatically removes
unneeded objects, optimizing memory usage.

8
6. Rich API – Offers built-in libraries for networking, database connectivity, data
structures, and more.
7. High Performance – Though an interpreted language, Java uses JIT (Just-In-Time)
compilation to boost execution speed.
8. Distributed Computing Support – Facilitates network-based applications, including
web servers and cloud-based solutions.
9. Simple & Familiar – Java’s syntax is similar to C/C++, making it easier for developers to
learn.

6.0 Basic Java Inheritance, Interface, package and database


program

package student;
import java.sql.*;
class Student { int id; String name; Student(int id, String name) { this.id = id; this.name
= name; }}
interface StudentDAO { void addStudent(Student student); }
class DatabaseHandler implements StudentDAO {
public void addStudent(Student student) {
try (Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/school", "root",
"password")) {
conn.prepareStatement("INSERT INTO students VALUES (" + student.id + ", '" +
student.name + "')").executeUpdate();
System.out.println("Student Added!");
} catch (SQLException e) { e.printStackTrace(); }
}
}
public class StudentManagement {
public static void main(String[] args) { new DatabaseHandler().addStudent(new
Student(1, "Alice")); }
}

9
7.0 Source Code

package studentApp;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

// Parent class (Inheritance)


class Student {
int id;
String name;

public Student(int id, String name) {


this.id = id;
this.name = name;
}

public void displayInfo() {


System.out.println("ID: " + id + ", Name: " + name);
}
}

// Child class extending Student


class GraduateStudent extends Student {
String researchTopic;

10
public GraduateStudent(int id, String name, String researchTopic) {
super(id, name);
this.researchTopic = researchTopic;
}

@Override
public void displayInfo() {
super.displayInfo();
System.out.println("Research Topic: " + researchTopic);
}
}

// Interface for Database Operations


interface StudentDAO {
void addStudent(Student student);
void updateStudent(Student student);
void deleteStudent(int id);
Student getStudent(int id);
List<Student> getAllStudents();
}

// Database interaction using JDBC


class DatabaseHandler implements StudentDAO {
private Connection connect() {
try {
return DriverManager.getConnection("jdbc:mysql://localhost:3306/school",
"root", "password");
} catch (SQLException e) {
e.printStackTrace();

11
return null;
}
}

@Override
public void addStudent(Student student) {
try (Connection conn = connect()) {
String sql = "INSERT INTO students (id, name, research_topic) VALUES (?, ?, ?)";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setInt(1, student.id);
stmt.setString(2, student.name);
stmt.setString(3, (student instanceof GraduateStudent) ? ((GraduateStudent)
student).researchTopic : null);
stmt.executeUpdate();
JOptionPane.showMessageDialog(null, "Student Added!");
} catch (SQLException e) {
e.printStackTrace();
}
}

@Override
public void updateStudent(Student student) {
try (Connection conn = connect()) {
String sql = "UPDATE students SET name = ?, research_topic = ? WHERE id = ?";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1, student.name);
stmt.setString(2, (student instanceof GraduateStudent) ? ((GraduateStudent)
student).researchTopic : null);
stmt.setInt(3, student.id);
stmt.executeUpdate();
JOptionPane.showMessageDialog(null, "Student Updated!");

12
} catch (SQLException e) {
e.printStackTrace();
}
}

@Override
public void deleteStudent(int id) {
try (Connection conn = connect()) {
String sql = "DELETE FROM students WHERE id = ?";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setInt(1, id);
stmt.executeUpdate();
JOptionPane.showMessageDialog(null, "Student Deleted!");
} catch (SQLException e) {
e.printStackTrace();
}
}

@Override
public Student getStudent(int id) {
try (Connection conn = connect()) {
String sql = "SELECT * FROM students WHERE id = ?";
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setInt(1, id);
ResultSet rs = stmt.executeQuery();

if (rs.next()) {
return new GraduateStudent(rs.getInt("id"), rs.getString("name"),
rs.getString("research_topic"));
} else {

13
JOptionPane.showMessageDialog(null, "Student Not Found!");
return null;
}
} catch (SQLException e) {
e.printStackTrace();
return null;
}
}

@Override
public List<Student> getAllStudents() {
List<Student> students = new ArrayList<>();
try (Connection conn = connect()) {
String sql = "SELECT * FROM students";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);

while (rs.next()) {
students.add(new GraduateStudent(rs.getInt("id"), rs.getString("name"),
rs.getString("research_topic")));
}
} catch (SQLException e) {
e.printStackTrace();
}
return students;
}
}

// GUI Class
public class StudentManagementGUI extends JFrame {

14
JTextField idField, nameField, topicField;
JButton addBtn, viewBtn, updateBtn, deleteBtn;
JTextArea displayArea;
DatabaseHandler db = new DatabaseHandler();

public StudentManagementGUI() {
setTitle("Student Management System");
setSize(500, 400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new GridLayout(6, 2));

add(new JLabel("ID:"));
idField = new JTextField(); add(idField);

add(new JLabel("Name:"));
nameField = new JTextField(); add(nameField);

add(new JLabel("Research Topic:"));


topicField = new JTextField(); add(topicField);

addBtn = new JButton("Add Student"); add(addBtn);


viewBtn = new JButton("View Students"); add(viewBtn);
updateBtn = new JButton("Update Student"); add(updateBtn);
deleteBtn = new JButton("Delete Student"); add(deleteBtn);

displayArea = new JTextArea(); add(new JScrollPane(displayArea));

addBtn.addActionListener(e -> db.addStudent(new GraduateStudent(


Integer.parseInt(idField.getText()), nameField.getText(), topicField.getText())));

15
viewBtn.addActionListener(e -> displayArea.setText(getStudentsInfo()));

updateBtn.addActionListener(e -> db.updateStudent(new GraduateStudent(


Integer.parseInt(idField.getText()), nameField.getText(), topicField.getText())));

deleteBtn.addActionListener(e ->
db.deleteStudent(Integer.parseInt(idField.getText())));

setVisible(true);
}

private String getStudentsInfo() {


StringBuilder result = new StringBuilder("All Students:\n");
for (Student student : db.getAllStudents()) {
result.append("ID: ").append(student.id)
.append(", Name: ").append(student.name)
.append(", Research Topic: ").append(((GraduateStudent)
student).researchTopic)
.append("\n");
}
return result.toString();
}

public static void main(String[] args) {


new StudentManagementGUI();
}
}

16
8.0 Output

1. Create a Database

2. Use the Database

3. Open Command Prompt

4. Compile the Program

5.Run the Program

17
6. show the Data

7.Perform Operations On the Data

18
9.0 Advantages & Features

1. Advantages:
• Efficiency – Automates student data handling, reducing manual work.
• Scalability – Easily expandable to include more functionalities (attendance, grades,
etc.).
• Security – Uses JDBC with MySQL, ensuring secure database management.
• Structured Code – Organized with inheritance, interface, and packages, making
maintenance easier.
• Modularity – Separates concerns (GUI, database, business logic), improving
reusability.
• User-Friendly – Provides a graphical interface (GUI) for easy interaction.
• Real-Time Updates – Modifications in student records are instantly reflected in the
database.

2. Key Features:

• Object-Oriented Design → Uses inheritance for easy extension.


• Interface-Based Database Handling → Ensures consistent CRUD operations.
• JDBC Integration → Connects and interacts with MySQL efficiently.
• GUI Support → Swing-based interface for adding, viewing, updating, and deleting
students.
• Error Handling → Prevents crashes with exception handling.
• Expandable System → Can add features like authentication, report generation, etc.

10.0 Skill Development:

1. Skill Development:
• Java Mastery – Enhances your Java skills with concepts like exception handling,
encapsulation, and abstraction.
• SQL & Database Handling – Teaches how to work with MySQL, making database
management easier.

19
• Problem Solving – Encourages logical thinking for designing efficient CRUD operations.

2. Practical Uses:
• Resume Enhancement – A great addition to your portfolio for job applications or
college projects.
• Expandable – You can add more functionalities like authentication, GUI, or reporting
features.
• Foundation for Larger Projects – Can be evolved into a full-fledged Student
Management System with additional modules.

11.0 Actual Resources Required

Sr.no Name of the resources Specification Quantity


required

1. Computer system 16 GB RAM, windows 10 OS 1

2. Internet Youtube/any resource As required

3. Textbook AJP 1

12.0 Conclusion
• Java offers the real possibility that most programs can be written in a type safe
language. However, for Java to be broadly useful, it needs to have more expressive
power than it does at present.
• Java extends Java with a mechanism for parametric polymorphism, which allows the
definition and implementation of generic abstractions. The paper gives a complete
design for the extended language.

20
ANNEXURE II
Evaluation Sheet for the Micro Project

Academic Year : 2024-25

Name of Faculty: Prof. Palwe P.D.

Course: JPR Course Code: 314317 Semester: 5th

Title of the Project: STUDENT MANAGEMENT SYSTEM

COs addressed by the Micro Project:


A: Develop Java programs using Inheritance ,Interface and Package.

B: Develop programs using database.

Major learning outcomes achieved by students by doing the Project:


(a)Practical outcomes:
1. Write a program to insert and retrieve the data from database using JDBC.

2. Write a program to update and delete a record from database table.

(b)Unit outcomes in Cognitive domain:


2a. Choose JDBC or ODBC depending on given application requirement.

2b. Use relevant type of JDBC Driver for the specified environment. (c)Outcomes in Affective
Domain---------------------------------------------------------------------- --------------------------------------------------
---------------------------------Comments/Suggestion about team work/leadership/inter-personal
communication (if any)

---------------------------------------------------------------------- ---------------------------------------------------------------
------------------------------------------------------------------------------------------

Sr. Student Name Student Name Marks Marks out of 4 for Total out
No. out of 6 for performance in oral/ of 10
performance in group presentation (D5 Col.9)
activity (D5 Col. 8) 1
1. Narote Pallavi .B
2. Shaikh Saniya .F
3. More Renvi .B

(Name & Signature of Faculty)


Prof. Palwe P.D.

21

You might also like