Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion assignments/lambda-classes.js
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
// CODE here for your Lambda Classes

class Person {
constructor(attributes) {
this.name = attributes.name;
this.age = attributes.age;
this.location = attributes.location;
}
speak() {
console.log('hello my name is ${this.name}');
}

}
// INSTRUCTOR
class Instructor extends Person {
constuctor() {
super();
this.specialty =
this.favLanguage =
catchPhrase =
}
demo(subject) {
console.log('Today we are learning about ${subject}');
}
grade(student) {
console.log('${student.name} receives a perfect score on ${subject}');
}
}

// STUDENT

class Student extends Person {
constructor() {
super();
this.previousBackground =
this.className =
this.favSubjects =
}

listsSubjects() {
console.log(favSubjects);
}

PRAssignment(subject) {
console.log('student.name');
}

springChallenge(subject) {
console.log('student.name has begun sprint challenge on ${subject}');
}
}

// PROJECT MANAGER

class ProjectManagers extends Instructor {
constuctor() {
super();
this.gradClassName =
this.favInstuctor =
}

standUp(channel) {
console.log('${name} announces to ${channel} standy times!');
}

debugsCode(Student, subject) {
console.log('${name debugs ${student.name}\'s code on ${subject}}');
}
}
35 changes: 31 additions & 4 deletions assignments/prototype-refactor.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
/*

Prototype Refactor

1. Copy and paste your code or the solution from yesterday

2. Your goal is to refactor all of this code to use ES6 Classes. The console.log() statements should still return what is expected of them.

*/
class GameObject {
constructor(attributes) {
this.createdAt = attributes.createdAt;
this.name = attributes.name;
this.dimensions = attributes.dimensions;
this.destroy = function () {
return `${this.name}` + " was removed from the game";
};
}
}


class CharacterStats {
constructor(attributes) {
this.healthPoints = attributes.healthPoints;
this.takeDamage = function () {
return `${this.name.toString}` + "took damage.";
};
}
}

class Humanoid {
constructor(attributes) {
this.team = attributes.team;
this.weapons = attributes.weapons;
this.language = attributes.language;
this.greet = function () {
return `${GameObject.name}` + `${this.language}`;
};
}
}