8000 updated · toneiobufon/JavaScript-IV@870e3ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 870e3ab

Browse files
committed
updated
1 parent 300f003 commit 870e3ab

File tree

2 files changed

+435
-5
lines changed

2 files changed

+435
-5
lines changed

assignments/lambda-classes.js

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,194 @@
11
// CODE here for your Lambda Classes
2+
3+
4+
class Person{
5+
constructor(attributes){
6+
this.name = attributes.name,
7+
this.age = attributes.age,
8+
this.location = attributes.location
9+
}
10+
speak(){
11+
return `Hello my name is ${this.name}, I am from ${this.location}`;
12+
};
13+
}
14+
15+
16+
class Instructor extends Person{
17+
constructor(attributes){
18+
super(attributes);
19+
this.specialty = attributes.specialty,
20+
this.favLanguage = attributes.favLanguage,
21+
this.catchPhrase = attributes.catchPhrase
22+
}
23+
demo(){
24+
return `Today we are learning about ${this.specialty}`;
25+
};
26+
grade(){
27+
return `${this.name} receives a perfect score on ${this.specialty}`;
28+
};
29+
add(){
30+
return `Let's give ${this.name} 10 extra points for effort!`;
31+
};
32+
33+
sub(){
34+
return ` ${this.name} will suffer 10 extra points off for not finishing the project!`;
35+
};
36+
}
37+
38+
class Student extends Person{
39+
constructor(attributes){
40+
super(attributes);
41+
this.previousBackground = attributes.previousBackground,
42+
this.className = attributes.className,
43+
this.favSubjects = attributes.favSubjects
44+
}
45+
listsSubjects(){
46+
return `${this.favSubjects}`;
47+
};
48+
49+
PRAssignment(){
50+
return `${this.name} has submitted a PR for ${this.className}`;
51+
};
52+
53+
sprintChallenge(){
54+
return ` ${this.name} has begun sprint challenge on ${this.className}`;
55+
};
56+
}
57+
58+
59+
class ProjectManager extends Instructors{
60+
constructor(attributes){
61+
super(attributes);
62+
this.gradClassName = attributes.gradClassName,
63+
this.favInstructor = attributes.favInstructor
64+
}
65+
standUp(){
66+
return `${thi.name} announces ${this.channel}, @channel standy times!`;
67+
};
68+
69+
debugsCode(){
70+
return `${this.name} debugs ${student.name}'s code on ${this.subject}`;
71+
};
72+
73+
}
74+
75+
76+
const Tom = new Person({
77+
name: 'Tom',
78+
age: 47,
79+
location: 'Bed'
80+
});
81+
82+
83+
84+
const Freddy = new Person({
85+
name: 'Fredddy',
86+
age: 27,
87+
location: 'Rock'
88+
});
89+
90+
91+
const Tim = new Person({
92+
name: 'Tim',
93+
age: 28,
94+
location: 'Rock-bed'
95+
});
96+
97+
98+
99+
const F = new Instructor({
100+
name: 'F',
101+
location: 'Cali',
102+
age: 27,
103+
favLanguage: 'JavaScript',
104+
specialty: 'Front-end',
105+
catchPhrase: `Don't forget the food`
106+
});
107+
108+
const T = new Instructor({
109+
name: 'T',
110+
location: 'Montana',
111+
age: 24,
112+
favLanguage: 'JAVA',
113+
specialty: 'Servers',
114+
catchPhrase: `let me SERVER you`
115+
});
116+
117+
118+
const M = new Instructor({
119+
name: 'M',
120+
location: 'Boston',
121+
age: 30,
122+
favLanguage: 'Python',
123+
specialty: 'Back-end',
124+
catchPhrase: `I don't bite`
125+
});
126+
127+
128+
const Ted = new Student({
129+
name: 'Ted',
130+
age: 22,
131+
location: 'Denver',
132+
previousBackground: 'chef',
133+
className: 'Java',
134+
favSubjects: ['math', 'science', 'biology', 'arts'],
135+
grade: 76
136+
})
137+
138+
139+
const Andrea = new Student({
140+
name: 'Andrea',
141+
age: 24,
142+
location: 'Orlando',
143+
previousBackground: 'student',
144+
className: 'CS',
145+
favSubjects: ['English', 'Econ', 'Marketing']
146+
grade: 98
147+
})
148+
149+
150+
const Ron = new Student({
151+
name: 'Ron',
152+
age: 22,
153+
location: 'Boston',
154+
previousBackground: 'runner',
155+
className: 'Programming',
156+
favSubjects: ['AI', 'science', 'Mobile Tec'],
157+
grade: 80
158+
})
159+
160+
const Nav = new ProjectManager({
161+
name: 'Nav',
162+
location: 'NYC',
163+
age: 30,
164+
favLanguage: 'C++',
165+
specialty: 'Servers',
166+
catchPhrase: `I don't bite, unless`,
167+
gradClassName: 'Javascript',
168+
favInstructor: 'M'
169+
})
170+
171+
const Louise = new ProjectManager({
172+
name: 'Louise',
173+
location: 'Toronto',
174+
age: 33,
175+
favLanguage: 'Ruby',
176+
specialty: 'Customer Applications',
177+
catchPhrase: `Bit me and you'll see`,
178+
gradClassName: 'Data Sci',
179+
favInstructor: 'T'
180+
})
181+
182+
const Hanna = new ProjectManager({
183+
name: 'Hanna',
184+
location: 'Galveston',
185+
age: 25,
186+
favLanguage: 'Python',
187+
specialty: 'cooking',
188+
catchPhrase: `Let's cook some Python!`,
189+
gradClassName: 'Python',
190+
favInstructor: 'F'
191+
})
192+
193+
194+

0 commit comments

Comments
 (0)
0