You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: assignments/lambda-classes.js
+23-9Lines changed: 23 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,36 @@ class Instructor extends Person {
23
23
grade(student,subject){
24
24
return`${student.name} recieves a perfect score on ${subject}`;
25
25
}
26
+
graduate(student){
27
+
if(this.grade>70){
28
+
console.log('Congratulations you have graduated')
29
+
}else{
30
+
console.log(`${student.name} because your score is only at ${student.grade} you are still not ready to graduate..... ${student.name} pleads with his instructor please let me have another chance to improve`)
31
+
this.gradingCurve(student);
32
+
}
33
+
}
26
34
gradingCurve(student){
27
-
student.grade+=Math.floor(Math.random()*5);
35
+
letstringOut=(`${student.name} let me review your latest work`)
36
+
letrandomGrade=Math.floor(Math.random()*5);
37
+
student.grade+=randomGrade;
38
+
letstringOut2=`Well ${student.name} you have completed this assignment and your score is now a ${student.grade}. That is an improvement of ${randomGrade} points`;
0 commit comments