Skip to content

Lesson 11 (Classes)

Courtney Frey edited this page Apr 13, 2022 · 2 revisions

Lesson 11: Classes

In the prep work for this lesson, the students learned:

  1. What a JavaScript class represents.
    1. Proper syntax
    2. Differences between a class and an object
  2. How to declare a class and:
    1. Add methods and properties,
    2. How to use constructor and this.
  3. Create new objects from a class.
  4. Inheritance.

Large Group Time (Instructor Notes)

Announcements

  1. 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.
  2. Check with your class Candidate Engagement Manager for any other announcements.

For Part-Time Students:

  1. Reminder that the third graded assignment is due soon!

For Full-Time Students:

  • 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

Lesson 11 Topics That Require More Attention

  1. Q & A for making the class methods work in the exercises.
  2. Review the difference between a class and an object.
  3. Live code the creation of a class (e.g. Car):
    1. Syntax review,
    2. Use constructor to add properties,
    3. Create two Car objects with new.
  4. Emphasize the difference between adding a method within constructor vs. outside of constructor. When should each approach be used?
  5. Live code an inheritance example.
    1. Inheritance is an abstract concept, and the students need practice setting it up.
  6. Studio intro.

Studio (TF Notes)

  1. Common student stumbling blocks:
    1. 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.
    2. Be prepared to review the syntax for constructor, as well as how to define properties and methods within a class.
    3. 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.
  2. Encourage students who finish early to complete the Bonus Mission or start the prep work for next class.
  3. As always, check in with each of your students.