-
Notifications
You must be signed in to change notification settings - Fork 59
Lesson 11 (Classes)
Courtney Frey edited this page Apr 13, 2022
·
2 revisions
- What a JavaScript class represents.
- Proper syntax
- Differences between a class and an object
- How to declare a class and:
- Add methods and properties,
- How to use
constructor
andthis
.
- Create new objects from a class.
- Inheritance.
- Students will soon need to install some software in order to complete upcoming chapters. Encourage them to contact their TFs if they have trouble with the process.
- Check with your class Candidate Engagement Manager for any other announcements.
- Reminder that the third graded assignment is due soon!
- Welcome to Days 15, 16, and 17
-
Day 15:
- Lesson 11 Prep work in the morning
- Introduce Assignment 3 and work time in the afternoon
- Assignment 2 due by end of today
-
Day 16:
- Assignment 3 work time in the morning
- Lesson 11 lecture and studio in the afternoon.
-
Day 17:
- Self-Assessment 2
- Assignment 3 work day
- Q & A for making the class methods work in the exercises.
- Review the difference between a class and an object.
- Live code the creation of a class (e.g.
Car
):- Syntax review,
- Use
constructor
to add properties, - Create two
Car
objects withnew
.
- Emphasize the difference between adding a method within
constructor
vs. outside ofconstructor
. When should each approach be used? - Live code an inheritance example.
- Inheritance is an abstract concept, and the students need practice setting it up.
- Studio intro.
- Common student stumbling blocks:
- Some students might try to use object literals instead of the
CrewCandidate
class to create the three required objects. Reinforce the benefits of declaring and using a class. - Be prepared to review the syntax for
constructor
, as well as how to define properties and methods within a class. - It has been a little while since students needed to use
Math.round
to round a number to 1 decimal place. Be prepared to help the students accomplish this.
- Some students might try to use object literals instead of the
- Encourage students who finish early to complete the Bonus Mission or start the prep work for next class.
- As always, check in with each of your students.