0% found this document useful (0 votes)
1 views13 pages

Computer Java School Management codeCS Project ISC2028-1

The document outlines a Computer Science project by Raunak, a Class XI student, focused on developing a Class Attendance Management System using Java. It includes acknowledgments, an introduction to Java and BlueJ IDE, project objectives, an algorithm for the system, and the complete source code along with sample output. The project aims to automate attendance recording and reporting to improve efficiency and reduce errors associated with manual processes.

Uploaded by

nirajpathak97826
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)
1 views13 pages

Computer Java School Management codeCS Project ISC2028-1

The document outlines a Computer Science project by Raunak, a Class XI student, focused on developing a Class Attendance Management System using Java. It includes acknowledgments, an introduction to Java and BlueJ IDE, project objectives, an algorithm for the system, and the complete source code along with sample output. The project aims to automate attendance recording and reporting to improve efficiency and reduce errors associated with manual processes.

Uploaded by

nirajpathak97826
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

K.E.

CARMEL SCHOOL, AMTALA


ISC 2028

COMPUTER SCIENCE PROJECT

Class Attendance Management System


(Using Java Programming Language)

Name Raunak
Class XI
Section Science
Roll Number 23
Topic Class Attendance Management System
Subject Computer Science (Java)
Session 2027 – 2028
1. ACKNOWLEDGEMENT
I, Raunak, a student of Class XI (Science), Roll No. 23, would like to sincerely thank all those
who supported me in completing this project.
I am deeply grateful to my Computer Science teacher for their patient guidance, timely
feedback, and continuous encouragement throughout this project. Their expertise and
dedication made the entire development process smooth and educational.
I would also like to thank the school Principal and management for providing access to the
computer laboratory and the necessary software tools, including BlueJ IDE, without which this
project could not have been built and tested.
I am thankful to my parents for their unwavering moral support and to my classmates for their
help and motivation during the project duration.
Lastly, I acknowledge the creators of the Java programming language and the BlueJ IDE for
building such powerful and student-friendly tools that made learning object-oriented
programming both practical and enjoyable.

Raunak
Class XI, Section Science, Roll No. 23
2. TABLE OF CONTENTS

Sl. Topic Page No.


No.
1 Acknowledgement 2
2 Table of Contents 3
3 Introduction to Java 4
4 Introduction to BlueJ 5
5 Project Question / Statement 6
6 Algorithm of the Project 7–8
7 Print Out of Source Code (BlueJ) 9–11
8 Print Out of Output (BlueJ) 12
9 Variable Description Table 13
10 Conclusion 14
3. INTRODUCTION TO JAVA
Java is a high-level, object-oriented, platform-independent programming language originally
developed by Sun Microsystems in 1995. It was created by James Gosling and his team and
officially released on May 23, 1995. Java follows the well-known principle of "Write Once, Run
Anywhere" (WORA), meaning a Java program compiled on one machine can run on any other
machine that has a Java Virtual Machine (JVM) installed.
Java is one of the most widely used programming languages in the world today, used in desktop
applications, web development, Android mobile apps, and large-scale enterprise systems.
Key Features of Java:
• Platform Independent: Java bytecode runs on any device with a JVM, making it OS-
independent.
• Object-Oriented: Java uses classes and objects, supporting concepts like inheritance,
encapsulation, and polymorphism.
• Simple Syntax: Java's syntax is similar to C and C++, making it easier for beginners to
learn.
• Secure: Java provides strong built-in security features including bytecode verification.
• Robust: Java has strong memory management and exception handling to reduce errors.
• Multithreaded: Java supports multithreading, allowing multiple tasks to run
simultaneously.
• High Performance: Java uses Just-In-Time (JIT) compilation to execute code efficiently.
• Dynamic: Java can adapt to changing environments and supports dynamic class loading.
Basic Java Program Structure:
• Package declaration (optional)
• Import statements
• Class declaration using the class keyword
• main() method: public static void main(String[] args)
• Statements and method definitions inside the class
Java was chosen for this project because of its simplicity, strong object-oriented features, and its
suitability for building management systems with structured data and menu-driven interfaces.
4. INTRODUCTION TO BLUEJ
BlueJ is a free, open-source Integrated Development Environment (IDE) specially designed for
learning and teaching Java. It was originally developed at Monash University, Australia and the
University of Southern Denmark. It is currently maintained as a collaboration between the
University of Kent and Oracle Corporation.
BlueJ is built with simplicity in mind, unlike professional IDEs such as Eclipse or IntelliJ IDEA. It
provides beginners with a clean, visual, and interactive environment to understand object-
oriented programming concepts.
Key Features of BlueJ:
• Interactive Class Diagram: BlueJ displays a visual diagram of classes and their
relationships, helping students understand OOP structure.
• Object Workbench: Users can create and interact with objects directly without needing a
main method.
• Code Pad: Allows users to test Java expressions quickly and interactively.
• Built-in Debugger: Includes a step-by-step debugger with breakpoints for finding errors.
• Simple Compilation: Code is compiled with a single click.
• Beginner-Friendly: Designed specifically for educational use, removing complexities that
overwhelm beginners.
• Free and Cross-Platform: Available on Windows, macOS, and Linux at no cost.
How to Use BlueJ for This Project:
• Download and install BlueJ from [Link]
• Open BlueJ and create a new project named 'ClassAttendance'
• Create a new class named 'ClassAttendance' inside the project
• Type or paste the source code in the editor window
• Click the 'Compile' button to compile the program
• Right-click on the class and select 'void main(String[] args)' to run it
• Interact with the program in the terminal window that appears
5. PROJECT QUESTION / STATEMENT
Project Statement:
"Develop an application using Java for the School Attendance Management System."
Problem Description:
In most schools, student attendance is still maintained in paper registers. This manual process
is slow, prone to human error, and makes it difficult to generate attendance reports or calculate
percentages quickly. Teachers spend unnecessary time on paperwork instead of focusing on
teaching.
This project addresses the problem by creating a menu-driven, console-based Java application
that automates the entire attendance recording and reporting process.
Objectives of the Project:
• To build a Java-based console application for tracking class attendance.
• To allow the user to register student names into the system.
• To record daily attendance for each student using a 1 (Present) / 0 (Absent) input
system.
• To display a complete attendance sheet in a formatted tabular layout.
• To calculate and display each student's attendance percentage with 2 decimal places.
• To provide a simple, numbered menu-driven interface for easy operation.
Scope of the Project:
• Supports up to 50 students and records attendance for up to 30 days.
• Suitable for a single classroom.
• Runs on any computer with Java installed.
• Developed and tested using the BlueJ IDE.
6. ALGORITHM OF THE PROJECT
The following algorithm describes the complete step-by-step working of the Class Attendance
Management System:
1. START the program.
2. Declare a String array nameList[] of size 50 to store student names.
3. Declare a 2D integer array record[][] of size 50×30 to store attendance (1=Present,
0=Absent).
4. Declare integer variables studentCount and dayCount, both set to 0.
5. Display the program title 'CLASS ATTENDANCE MANAGEMENT SYSTEM'.
6. Display the main menu with options: (1) Register Student, (2) Take Daily Attendance, (3)
Show Attendance Sheet, (4) View Attendance Summary, (5) Quit.
7. Read the user's choice using Scanner.
8. If choice = 1: Check if studentCount has reached 50. If yes, print 'Maximum limit reached'
and return. Otherwise, read the student name, store in nameList[studentCount],
increment studentCount by 1, and display 'Student registered successfully!'.
9. If choice = 2: Check if studentCount is 0; if so, display 'No students registered yet'.
Check if dayCount equals 30; if so, display 'All 30 days recorded'. Otherwise, loop
through all students using a for loop, ask for 1 (Present) or 0 (Absent) for each, store in
record[i][dayCount], then increment dayCount by 1.
10. If choice = 3: Check if studentCount is 0; if so, display 'No records'. Otherwise, print a
header row with student names and day numbers, then use a nested loop to print 'P' or
'A' for each student per day.
11. If choice = 4: Check if studentCount or dayCount is 0. Otherwise, loop through each
student, count how many days record[i][d] == 1, calculate percentage as (count ×
100.0) / dayCount, and display the result.
12. If choice = 5: Print 'Goodbye!' and exit the do-while loop.
13. For any other input, display 'Wrong choice!'.
14. Repeat steps 6–13 in a do-while loop until option 5 is selected.
15. Close the Scanner object.
16. STOP.
7. PRINT OUT OF SOURCE CODE (BLUEJ)
The following is the complete source code of the project written and compiled in BlueJ:

import [Link];

public class ClassAttendance {

static String[] nameList = new String[50];


static int[][] record = new int[50][30];
// record[i][j] = 1 means present, 0 means absent
static int studentCount = 0;
static int dayCount = 0;

public static void main(String[] args) {


Scanner input = new Scanner([Link]);
int option;

[Link]("*********************************************");
[Link]("* CLASS ATTENDANCE MANAGEMENT SYSTEM *");
[Link]("*********************************************");

do {
[Link]("\n========== MAIN MENU ==========");
[Link](" [1] Register New Student");
[Link](" [2] Take Daily Attendance");
[Link](" [3] Show Attendance Sheet");
[Link](" [4] View Attendance Summary");
[Link](" [5] Quit Program");
[Link]("================================");
[Link]("Your choice: ");
option = [Link]();

if (option == 1) {
registerStudent(input);
} else if (option == 2) {
takeAttendance(input);
} else if (option == 3) {
showSheet();
} else if (option == 4) {
showSummary();
} else if (option == 5) {
[Link]("\nThank you for using the system.
Goodbye!");
} else {
[Link]("Wrong choice! Please enter a number from 1
to 5.");
}

} while (option != 5);

[Link]();
}
static void registerStudent(Scanner input) {
if (studentCount == 50) {
[Link]("Cannot add more students. Maximum limit
reached.");
return;
}
[Link](); // flush buffer
[Link]("Enter student name: ");
nameList[studentCount] = [Link]();
studentCount++;
[Link]("Student registered successfully! Total students: "
+ studentCount);
}

static void takeAttendance(Scanner input) {


if (studentCount == 0) {
[Link]("No students registered yet. Please add students
first.");
return;
}
if (dayCount == 30) {
[Link]("All 30 days of attendance have been
recorded.");
return;
}

int today = dayCount + 1;


[Link]("\n--- Recording Attendance for Day " + today + "
---");

for (int i = 0; i < studentCount; i++) {


[Link](nameList[i] + " - Present(1) / Absent(0): ");
int val = [Link]();
if (val == 1) {
record[i][dayCount] = 1;
} else {
record[i][dayCount] = 0;
}
}
dayCount++;
[Link]("Day " + today + " attendance saved.");
}

static void showSheet() {


if (studentCount == 0) {
[Link]("No records to display.");
return;
}
[Link]("\n--- ATTENDANCE SHEET ---");
[Link]("%-22s", "Name");
for (int d = 1; d <= dayCount; d++) {
[Link]("D%-4d", d);
}
[Link]();
[Link]("----------------------------------------------");

for (int i = 0; i < studentCount; i++) {


[Link]("%-22s", nameList[i]);
for (int d = 0; d < dayCount; d++) {
[Link]("%-5s", record[i][d] == 1 ? "P" : "A");
}
[Link]();
}
}

static void showSummary() {


if (studentCount == 0 || dayCount == 0) {
[Link]("Not enough data to calculate summary.");
return;
}
[Link]("\n--- ATTENDANCE SUMMARY ---");
[Link]("%-22s %-12s %s\n", "Name", "Days Present",
"Percentage");

[Link]("--------------------------------------------------");

for (int i = 0; i < studentCount; i++) {


int count = 0;
for (int d = 0; d < dayCount; d++) {
if (record[i][d] == 1) count++;
}
double pct = (count * 100.0) / dayCount;
[Link]("%-22s %-12d %.2f%%\n", nameList[i], count, pct);
}
}
}
8. PRINT OUT OF OUTPUT (BLUEJ)
The following is the sample output produced when the program is run in BlueJ's terminal
window:

*********************************************
* CLASS ATTENDANCE MANAGEMENT SYSTEM *
*********************************************

========== MAIN MENU ==========


[1] Register New Student
[2] Take Daily Attendance
[3] Show Attendance Sheet
[4] View Attendance Summary
[5] Quit Program
================================
Your choice: 1
Enter student name: Raunak
Student registered successfully! Total students: 1

Your choice: 1
Enter student name: Ananya Das
Student registered successfully! Total students: 2

Your choice: 2
--- Recording Attendance for Day 1 ---
Raunak - Present(1) / Absent(0): 1
Ananya Das - Present(1) / Absent(0): 0
Day 1 attendance saved.

Your choice: 3
--- ATTENDANCE SHEET ---
Name D1 D2
----------------------------------------------
Raunak P P
Ananya Das A P

Your choice: 4
--- ATTENDANCE SUMMARY ---
Name Days Present Percentage
--------------------------------------------------
Raunak 2 100.00%
Ananya Das 1 50.00%

Your choice: 5
Thank you for using the system. Goodbye!
9. VARIABLE DESCRIPTION TABLE
The following table lists and describes all variables used in the program:

Variable Name Data Type Description


nameList[] String[ ] 1D array of size 50. Stores the name of each registered
student.
record[][] int[ ][ ] 2D array of size 50×30. Stores 1 (Present) or 0 (Absent)
for each student per day.
studentCount int Tracks how many students have been registered. Used as
index for nameList[].
dayCount int Tracks how many days of attendance have been
recorded. Used as column index for record[][].
option int Stores the user's menu choice (1 to 5) inside the do-while
loop.
input Scanner Scanner object used to read all keyboard input from the
user.
i int Loop variable used in for loops to iterate over each
student (0 to studentCount-1).
d int Loop variable used in inner for loops to iterate over each
day (0 to dayCount-1).
val int Stores the user's attendance input: 1 for Present, 0 for
Absent.
count int Counts the number of days a particular student was
present. Used in showSummary().
pct double Stores the calculated attendance percentage. Formula:
(count × 100.0) / dayCount.
today int Holds the current day number being recorded (dayCount +
1). Used for display only.
10. CONCLUSION
The Class Attendance Management System developed in Java successfully automates the task
of recording and managing student attendance. The project uses key Java concepts such as
arrays, 2D arrays, loops, methods, and Scanner input to build a fully functional console
application.
The application allows a teacher to register students, mark daily attendance, view a formatted
attendance sheet, and calculate each student's attendance percentage through a simple menu-
driven interface. This removes the need for manual registers and reduces errors significantly.
Through this project, I learned how to divide a problem into smaller methods and how to use 2D
arrays to store structured data. The BlueJ IDE made it easy to write, compile, and test the
program.
Future Improvements:
• Adding file handling to save data permanently.
• Building a GUI using Java Swing for a better user experience.
• Connecting to a database for large-scale use.

Overall, this project was a valuable learning experience that improved my understanding of Java
and practical problem-solving.

Raunak
Class XI, Section Science, Roll No. 23

You might also like