Skip to content
Open
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
47 changes: 47 additions & 0 deletions assignments/lambda-classes.js
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
// CODE here for your Lambda Classes

Class Parent {
constructor(attributes) {
this.children = attributes.children
this.options = attributes.options
this.age = attributes.age
this.gender = attributes.gender
this.hometown = attributes.hometown
this.name = attributes.name
}
}

Class instructor extends Parent {
constructor(instructorAttributes)
super(instructorAttributes);
console.log("These are attributes! " + Object.entries(instructorAttributes));
this.person = instructorAttributes.person;
this.specialty = instructorAttributes.specialty;
this.favlanguage = instructorAttributes.favlanguage;
this.catchPhrase = instructorAttributes.catchPhrase;
}

redux() {
return `This is the specialty I used with: ${this.specialty}`
}



Class student extends Instructor {
constructor(studentAttributes)
super(studentAttributes);
this.student = studentAttributes.previousBackground;
this.className = studentAttributes.className;
this.catchPhrase = studentAttributes.catchPhrase;
}

listSubjects() {
return `LIST SUBJECTS`
}

Class PRAssignment {
constructor(class,Name)
}




24 changes: 12 additions & 12 deletions assignments/prototype-refactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ const mage = new Humanoid({
height: 1
},
hp: 5,
name: 'Bruce',
faction: 'Mage Guild',
weapons: ['Staff of Shamalama'],
language: 'Common Toungue'
name: "Bruce",
faction: "Mage Guild",
weapons: ["Staff of Shamalama"],
language: "Common Toungue"
});

const swordsman = new Humanoid({
Expand All @@ -58,10 +58,10 @@ const swordsman = new Humanoid({
height: 2
},
hp: 15,
name: 'Sir Mustachio',
faction: 'The Round Table',
weapons: ['Giant Sword', 'Shield'],
language: 'Common Toungue'
name: "Sir Mustachio",
faction: "The Round Table",
weapons: ["Giant Sword", "Shield"],
language: "Common Toungue"
});

const archer = new Humanoid({
Expand All @@ -72,10 +72,10 @@ const archer = new Humanoid({
height: 4
},
hp: 10,
name: 'Lilith',
faction: 'Forest Kingdom',
weapons: ['Bow', 'Dagger'],
language: 'Elvish'
name: "Lilith",
faction: "Forest Kingdom",
weapons: ["Bow", "Dagger"],
language: "Elvish"
});

console.log(mage.createdAt); // Today's date
Expand Down