Skip to content

kalviumcommunity/Vishwajeet_S63_Attendance_management_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

School Attendance System

This is a 10-part code-along project to build a console-based school attendance system in Java.

Part 1: Introduction and Orientation

  • Verified Java and Git setup.
  • Initialized Git repository for the project.
  • Created basic project structure with Main.java.
  • Compiled and ran the initial "Welcome" program.
  • Pushed initial setup to a part-01 branch on GitHub and created a PR.

How to Run

  1. Navigate to the project root directory (AttendanceSystem).

  2. Compile: javac src/com/school/Main.java

  3. Run: java -cp src com.school.Main

  4. Session 2: Core Domain Modelling

  • Defined Student class with studentId, name, setDetails(), and displayDetails() method.
  • Defined Course class with courseId, courseName, setDetails(), and displayDetails() method.
  • Utilized arrays of objects in Main.java to manage and display multiple students and courses.
  • Introduced basic usage of this keyword.

How to Run

  1. Navigate to the project root directory.
  2. Compile: javac src/com/school/Student.java src/com/school/Course.java src/com/school/Main.java (or javac src/com/school/*.java)
  3. Run: java -cp src com.school.Main

Part 3: Constructor Initialization & Auto-ID Generation

  • Implemented parameterized constructors in Student and Course classes for object initialization.
  • Utilized private static member variables for automatic and unique ID generation.
  • Student IDs start from 1 and auto-increment (1, 2, 3, 4...)
  • Course IDs start from 101 and auto-increment with "C" prefix (C101, C102, C103...)
  • Demonstrated the use of the this keyword to distinguish instance variables from constructor parameters.
  • Changed Course's courseId to int for simpler auto-generation and updated its display.
  • Updated Main.java to use constructors and show ID progression with multiple instances.
  • Removed setDetails() methods as constructors now handle initialization.

How to Run (ensure this is up-to-date)

  1. Navigate to the project root directory.
  2. Compile: javac src/com/school/*.java (compiles all Java files in the directory)
  3. Run: java -cp src com.school.Main

Part 4: Data Encapsulation & Attendance Recording Validation

  • Applied encapsulation to Student and Course classes by making fields private and adding public getters.
  • Introduced a new AttendanceRecord class with private fields, a constructor, and getters to store attendance data.
  • Implemented basic validation in the AttendanceRecord constructor for the attendance status (allowing only "Present" or "Absent").
  • Used an ArrayList in Main.java to store and display AttendanceRecord objects.
  • Demonstrated retrieving IDs using getters (e.g., student1.getStudentId()) when creating records.

How to Run the app

  1. Navigate to the project root directory.
  2. Compile: javac src/com/school/*.java (or list individual files including AttendanceRecord.java)
  3. Run: java -cp src com.school.Main

Updated on Mon, Sep 22, 2025 10:51:15 AM

About

This is your first repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages