11// CODE here for your Lambda Classes
2+ class Person {
3+ constructor ( props ) {
4+ this . name = props . name ;
5+ this . age = props . age ;
6+ this . location = props . location ;
7+ this . gender = props . gender ;
8+ }
9+ speak ( ) {
10+ return `Hello my name is ${ this . name } , I am from ${ this . location } `
11+ }
12+ }
13+
14+ class Instructor extends Person {
15+ constructor ( cprops ) {
16+ super ( cprops ) ;
17+ this . speciality = cprops . speciality ;
18+ this . favLanguage = cprops . favLanguage ;
19+ this . catchPhrase = cprops . catchPhrase ;
20+ }
21+ demo ( subject ) {
22+ return `Today we are learning about ${ subject } ` ;
23+ }
24+ grade ( student , subject ) {
25+ return `${ student . name } recieves a perfect score on ${ subject } ` ;
26+ }
27+ }
28+
29+ class Student extends Person {
30+ constructor ( cprops ) {
31+ super ( cprops ) ;
32+ this . previousBackground = cprops . previousBackground ;
33+ this . className = cprops . className ;
34+ this . favSubjects = cprops . favSubjects ;
35+ }
36+ listSubjects ( ) {
37+ return this . favSubjects . join ( ', ' ) ;
38+ }
39+ PRAssignment ( subject ) {
40+ return `${ this . name } has submitted a PR for ${ subject } ` ;
41+ }
42+ sprintChallenge ( subject ) {
43+ return `${ this . name } has begun spring challege on ${ subject } ` ;
44+ }
45+ }
46+ class ProjectManager extends Instructor {
47+ constructor ( gcprops ) {
48+ super ( gcprops ) ;
49+ this . gradClassName = gcprops . gradClassName ;
50+ this . favInstructor = gcprops . favInstructor ;
51+ }
52+ standUp ( channel ) {
53+ return `${ this . name } announces to ${ channel } , @channel standy times!` ;
54+ }
55+ debugsCode ( student , subject ) {
56+ return `${ this . name } debugs ${ student . name } 's code on ${ subject } `
57+ }
58+ }
59+
60+
61+ const jonathan = new Student ( {
62+ name : "Jonathan" ,
63+ age : 32 ,
64+ location : "MidWest" ,
65+ gender : "Male" ,
66+ previousBackground : "Quality Assurance" ,
67+ className : "JavaScript Fundamentals" ,
68+ favSubjects : [ "Programming" , "Creative Writing" , "Finance" ]
69+ } )
70+ const holloway = new Student ( {
71+ name : "Holloway" ,
72+ age : 32 ,
73+ location : "MidWest" ,
74+ gender : "Male" ,
75+ previousBackground : "Quality Assurance" ,
76+ className : "JavaScript Fundamentals" ,
77+ favSubjects : [ "Programming" , "Creative Writing" , "Finance" ]
78+ } )
79+
80+ const josh = new Instructor ( {
81+ name : "Josh" ,
82+ age : "unknown" ,
83+ location : "Somewhere" ,
84+ gender : "Male" ,
85+ speciality : "Full Stack" ,
86+ catchPhrase : "Let's be back in 5 mins"
87+ } )
88+ const fred = new Instructor ( {
89+ name : 'Fred' ,
90+ location : 'Bedrock' ,
91+ age : 37 ,
92+ gender : 'male' ,
93+ favLanguage : 'JavaScript' ,
94+ specialty : 'Front-end' ,
95+ catchPhrase : `Don't forget the homies`
96+ } ) ;
0 commit comments