Skip to content

Commit bc399fd

Browse files
committed
Studio changes
1 parent a3707dd commit bc399fd

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

classes/studio/ClassStudio.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,43 +37,42 @@ class CrewCandidate {
3737
}
3838
}
3939

40-
// Create objects for the candidates
40+
4141
const bubbaBear = new CrewCandidate("Bubba Bear", 135, [88, 85, 90]);
4242
const merryMaltese = new CrewCandidate("Merry Maltese", 1.5, [93, 88, 97]);
4343
const gladGator = new CrewCandidate("Glad Gator", 225, [75, 78, 62]);
4444

45-
// Add scores to candidates' records
45+
//adding scores
4646
bubbaBear.addScore(83);
4747
merryMaltese.addScore(95);
4848
gladGator.addScore(80);
4949

50-
// Get the status for each candidate
51-
const bubbaBearStatus = bubbaBear.status();
52-
const merryMalteseStatus = merryMaltese.status();
53-
const gladGatorStatus = gladGator.status();
50+
51+
let bubbaBearStatus = bubbaBear.status();
52+
let merryMalteseStatus = merryMaltese.status();
53+
let gladGatorStatus = gladGator.status();
5454

5555
console.log(`${bubbaBear.name} earned an average test score of ${bubbaBear.calculateAverageScore()}% and has a status of ${bubbaBearStatus}.`);
5656
console.log(`${merryMaltese.name} earned an average test score of ${merryMaltese.calculateAverageScore()}% and has a status of ${merryMalteseStatus}.`);
5757
console.log(`${gladGator.name} earned an average test score of ${gladGator.calculateAverageScore()}% and has a status of ${gladGatorStatus}.`);
5858

59-
// Reset Glad Gator's scores for the test
59+
6060
gladGator.scores = [75, 78, 62];
6161

62-
// Define the target status
63-
const targetStatus = "Accepted";
62+
let targetStatus = "Accepted";
6463

6564
let testsTaken = 0;
6665

6766
while (gladGator.status() !== targetStatus) {
68-
// Increment the test score by 5 (or any other increment you prefer)
67+
6968
const newScore = gladGator.scores[testsTaken % 3] + 5;
7069

71-
// Ensure the score doesn't exceed 100
70+
7271
if (newScore <= 100) {
7372
gladGator.scores[testsTaken % 3] = newScore;
7473
testsTaken++;
7574
} else {
76-
break; // Break the loop if the score cannot be increased further
75+
break;
7776
}
7877
}
7978

0 commit comments

Comments
 (0)