Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
The setGradeLevel method is a function or method used in programming to update or change the grade level attribute or property of an object. It allows you to modify the grade level associated with a particular object.
The getGradeLevel method retrieves or gets the current grade level attribute or property of an object. It returns the existing grade level associated with that particular object.
inheritance: Inheritance is a concept in object-oriented programming where one class inherits properties and methods from another class. It allows for code reuse and creating hierarchical relationships between classes.
encapsulation: Encapsulation is one of the four fundamental principles of object-oriented programming (OOP). It refers to bundling data (attributes) and methods (functions) together within a class, hiding internal details from outside access.