Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 1.24 KB

File metadata and controls

20 lines (13 loc) · 1.24 KB

🎓 Student Result System

Course: Object-Oriented Programming in JAVA Lab (BCA39109)

This project implements a student grading and result calculation system. It demonstrates how Java handles multiple inheritance using a combination of class extension and interface implementation, mapping exactly to the provided class hierarchy diagram.

🧠 Core OOP Concepts Demonstrated

  • Interfaces & Multiple Inheritance: Uses the Exam interface alongside the Student base class to create a composite Result class. Java does not support multiple inheritance with classes, so this pattern is the standard workaround.
  • Inheritance (extends): The Result class inherits attributes (Name, Roll No, Marks) and behaviors (show()) from the Student class.
  • Interface Implementation (implements): The Result class fulfills the strict contract of the Exam interface by defining the calculation method.
  • Encapsulation: Class variables are kept private, with protected getters used to allow secure data access by the subclass.

🚀 How to Compile and Run

Ensure you have the Java Development Kit (JDK) installed.

  1. Open your terminal or command prompt.
  2. Navigate to the directory containing the file.
  3. Compile the Java code: