The School Result System is a Java console-based application that simulates a grading system for primary and high school students. It demonstrates the use of Object-Oriented Programming (OOP) concepts such as inheritance, encapsulation, and polymorphism to model real-world entities and behaviors.
- The system defines a base
Personclass with general details. - A
Studentclass extendsPersonand acts as a blueprint for specific student categories. PrimaryStudentandHighSchoolStudentextendStudent, each with their own grading logic.- The program calculates grades based on subject marks and displays results in a structured format.
- Create student profiles with personal and academic details.
- Calculate and assign grades based on average marks.
- Separate grading criteria for Primary and High School students.
- Display formatted result reports with complete information.
- Inheritance →
Person→Student→PrimaryStudent/HighSchoolStudent. - Encapsulation → Getters and Setters for controlled attribute access.
- Polymorphism → Overridden
calculateGrade()anddisplayResult()methods. - Abstraction of real-world entities into hierarchical classes.
- Java (Core Java, OOP)
- IDE / Text Editor: IntelliJ IDEA, Eclipse, Netbeans or VS Code
- Console Output for interaction
-
Clone the repository:
https://github.com/rawahazkhan/School-Result-System.git
-
Open the project in your IDE (or VS Code).
-
Compile the program:
javac SchoolResultSystem.java
-
Run the program:
java SchoolResultSystem
When executed, the program outputs student results like this:
***** School Result System *****
Primary Student Information:
Name: Ayesha
Age: 10
ID Number: PR024
Roll Number: 10
Class: Grade 4
Drawing Marks: 85
Math Marks: 90
Grade: B
********************************
High School Student Information:
Name: Sara
Age: 16
ID Number: H001
Roll Number: R23
Class: Class 10
Science Marks: 88
Math Marks: 95
Computer Marks: 92
Grade: A