A simple Java console-based application designed to practice and demonstrate core Object-Oriented Programming (OOP) concepts including Inheritance, Interfaces, Polymorphism, Aggregation, and more.
β
Manage Students, Teachers, Admin staff, and Courses
β
Compute salaries dynamically for Teachers (based on handled courses) and Admins (with fixed allowances)
β
Aggregate shared Course objects between Students and Teachers
β
Demonstrates runtime polymorphism via a Payable interface
β
Clean, organized OOP structure and class relationships
- β Object-Oriented Programming (OOP)
- β Constructors
- β
Array of Objects (
ArrayList) - β Static variables and methods
- β Inheritance
- β
superkeyword for constructor chaining - β Method Overriding
- β Abstraction via interfaces
- β
Interfaces (
Payable) - β Polymorphism (including runtime polymorphism)
- β Getters and Setters
- β Aggregation (shared Course objects)
- Clone the repository
git clone https://github.com/geloy-n/School-Management-System-OOP-Java.git cd School-Management-System-OOP-Java/src - Compile the project
javac models/*.java Main.java - Run the program
java Main
Student ID: 1, Name: John, Age: 20
Student ID: 2, Name: Mark, Age: 21
Teacher ID: 1, Name: Matthew, Age: 30, Base Salary: 40000.0, Total Salary: 44000.0
Total Number of Students: 2
Total Number of Teachers: 1
Courses handled by Matthew:
- Mathematics 101 (MATH101)
- Science 101 (SCI101)
Courses enrolled by John:
- Mathematics 101 (MATH101)
Courses enrolled by Mark:
- Science 101 (SCI101)
Teacher ID: 1, Name: Matthew, Age: 30, Base Salary: 40000.0, Total Salary: 44000.0
Admin Name: Luke, Base Salary: 50000.0, Allowance: 8000.0, Total Salary: 58000.0
Updating base salary for Matthew from 40000.0 to 45000.0
Teacher ID: 1, Name: Matthew, Age: 30, Base Salary: 45000.0, Total Salary: 47000.0
Courses handled by Matthew:
- Mathematics 101 (MATH101)