☑Kizspy.me
-gpa: int
+ Student(id:String, name:String,
email:String, gpa:int)
+getGpa():int
+setGpa(gpa:int):void
+getReward ():double
+toString():String
Student(id:String, name:String, email:String,
gpa:int)-parameterized constructor, which
sets values to id, name, email, and gpa. If
the gpa is less than 0 or greater than 100 then
set it to 0

getGpa():int-return the gpa

setGpa(gpa:int):void-update the gpa. If the
gpa is less than 0 or greater than 100 then set
it to 0

getReward (): double-return the reward
(default reward is 0) calculated according to
the following formula:
-If 70 gpa <80 then reward is 7000 * P
-If 80 gpa <90 then reward is 8000* P
-If 90 gpa <100 then reward is 9000 * P
with P-gpa/100, for example: if gpa is 80
then P 80/100=0.8

toString(): String - return a string format that
contains all the information of the student: id,
name, email, reward. The name is in
uppercase format and the reward is formatted
to two decimal places.
Zoom
+ 100%
Close