Skip to content

Commit caf0e79

Browse files
committed
yes
1 parent c652f05 commit caf0e79

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

classes/studio/ClassStudio.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
//Declare a class called CrewCandidate with a constructor that takes three parameters—name, mass, and scores. Note that scores will be an array of test results.
22

3+
class CrewCandidate {
4+
constructor(name, mass, scores) {
5+
this.name = name;
6+
this.mass = mass;
7+
this.scores = scores;
8+
}
9+
}
10+
11+
// Create objects for the candidates
12+
const bubbaBear = new CrewCandidate("Bubba Bear", 135, [88, 85, 90]);
13+
const merryMaltese = new CrewCandidate("Merry Maltese", 1.5, [93, 88, 97]);
14+
const gladGator = new CrewCandidate("Glad Gator", 225, [75, 78, 62]);
15+
16+
// Use console.log to verify the objects
17+
console.log(bubbaBear);
18+
console.log(merryMaltese);
19+
console.log(gladGator);
20+
321

422

523
//Add methods for adding scores, averaging scores and determining candidate status as described in the studio activity.

0 commit comments

Comments
 (0)