Question: Class Question Write the code of a class Student with Name, Number, GPA properties with setter and getter methods and other methods according to the
Class Question Write the code of a class "Student" with Name, Number, GPA properties with setter and getter methods and other methods according to the following requirements: a) the class has a constructor that accepts a name and a gpa to create an object. b) the number is assigned automatically when the object is created and it consists of "2021" + the number starting from 100. c) the GPA should only have values from 35 to 100 d) no client program/class can set the number except within the Student class e) the class should have a method to enable someone to change the GPA to a new value entered by him f) the class should have a single method to increase or decrease the GPA by a certain percentage entered by someone
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
