Add entities to grade class and make some improvements in the class
Required Actions
- Add JPA annotations to the Grade class to properly map it as a database entity.
- Add setters for Grade class fields.
- Improve the setScore method to restrict score values to a valid range between 0 and 100. If the score is outside this range, throw an IllegalArgumentException.
- Ensure proper validation for the grade assignment process in the class.
Expected Deliverables
- The Grade class should be updated with the required JPA annotations to make it a valid entity.
- Setters for the Grade class should be added to ensure proper data encapsulation.
- The setScore method should enforce that scores are only allowed between 0 and 100, with appropriate exception handling for invalid values.
Edited by Uluturk Tolga (2022) ZLAC170