diff --git a/assignments/lambda-classes.js b/assignments/lambda-classes.js index 71acfca0e..84efa2556 100644 --- a/assignments/lambda-classes.js +++ b/assignments/lambda-classes.js @@ -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) +} + + + + diff --git a/assignments/prototype-refactor.js b/assignments/prototype-refactor.js index e55ae39c0..1cb5b861e 100644 --- a/assignments/prototype-refactor.js +++ b/assignments/prototype-refactor.js @@ -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({ @@ -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({ @@ -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