forked from bloominstituteoftechnology/JavaScript-IV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda-classes.js
More file actions
executable file
·102 lines (90 loc) · 2.21 KB
/
Copy pathlambda-classes.js
File metadata and controls
executable file
·102 lines (90 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
class Person {
constructor(attributes){
this.name = attributes.name;
this.age = attributes.age;
this.location = attributes.location;
this.gender = attributes.gender;
}
speak(){
return `Hello my name is ${this.name} I am from ${this.location}`;
}
}//end person
class Instructor extends Person {
constructor(attributes) {
super(attributes);
this.favLanguage = attributes.favLanguage;
this.specialty = attributes.specialty;
this.catchPhrase = attributes.catchPhrase;
}
demo(){
return `Today we are learning about ${this.subject}`;
}
grade(){
`Student ${student.name} recieves a perfect score on ${this.subject}`;
}
}//ends instructor
class Student extends Person {
constructor(attributes){
super (attributes);
this.previousBackground = attributes.previousBackground;
this.className = attributes.className;
this.favSubjects = attributes.favSubjects;
}
listSubjects(){
function subject(list){
}
}
//this.favSubject.forEach(subject);
//console.log(subject);
PRAssignment(){
return `${student.name} has submitted a PR for ${this.subject}`;
}
sprintChallenge(){
return `${student.name} has begun the Sprint Challenge`;
}
}
class PM extends Instructor {
constructor(attributes) {
super(attributes);
this.gradClass = attributes.gradClass;
this.favInstructor = attributes.favInstructor;
}
standup() {
return `${PM.name} announces to ${channel} @channel standup times!`;
}
debugsCode(){
return `${PM.name} debugs ${student.name}'s code on ${this.subject}`;
}
}// ends instructor
const brynne = new Student({
"name" : 'Brynne',
"age" : 21,
"location" : 'Small Town',
"gender" : 'female',
"previousBackground" : 'Medical',
"className" : 'CS15',
"favSubjects" : ["Javascript","CSS","HTML"],
});
const fred = new Instructor({
"name": 'Fred',
"location": 'Bedrock',
"age": 37,
"gender": 'male',
"favLanguage": 'JavaScript',
"specialty": 'Front-end',
"catchPhrase": `Super-Powerful`
});
const kigh = new PM ({
"name" : 'Kigh',
"age" : 47,
"location" : 'Texas',
"gender" : 'female',
"gradClass" : 2008,
"favInstructor" : 'Professor',
"favLanguage": 'JavaScript',
"specialty": 'Front-end',
"catchPhrase": `Awesome!`
});
console.log(brynne);
console.log(kigh);
console.log(fred);