Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Practice Object Interaction Course (How To)

via Treehouse

Overview

Get more familiar with building different classes, instantiating objects and having those objects interact with one another in a complete app.

What you'll learn

  • Classes
  • Object-oriented JavaScript
  • Object interaction

Syllabus

The Rough Plan

We'll develop a rough coding plan for our library project.

Chevron 7 steps
  • Introducing the Project

    0:46

  • Explanation: A Rough Plan

    3:54

  • instruction

    Recap: Plan of Attack

  • Explanation: Building Constructor Methods

    2:45

  • instruction

    Solution: Building Constructor Methods

  • Demo: New Library, Patron, and Book Objects

    2:25

  • The Rough Plan

    2 questions

Starting with Some Methods

In this stage we'll try to implement the rough plan and add some methods to the classes.

Chevron 7 steps
  • Explanation: Adding Methods to the Library Class

    1:20

  • instruction

    Solution: Adding Methods to the Library Class

  • Demo: Add Patrons and Books to the Library Class

    1:58

  • Explanation: Checking Out and Returning Books

    1:24

  • instruction

    Recap: Updating our Plan of Attack

  • instruction

    Solution: Adding New Properties to the Book Class

  • Starting with Some Methods

    4 questions

Checking Out and Returning a Book

In this stage, we'll continue with our rough plan and let our Patrons check out and return a book.

Chevron 11 steps
  • Explanation: Revisiting the checkOut() and returnBook() Methods

    1:42

  • instruction

    Solution: checkOut() and returnBook() Methods

  • Explanation: A Better Way With Setters Methods

    1:32

  • instruction

    Recap: A Better Way With Setter Methods

  • instruction

    Solution: A Better Way With Setter Methods

  • Demo: Checking Out and Returning a Book

    2:07

  • Explanation: Charging Fines to Patrons

    0:40

  • instruction

    Recap: Charging Fines to Patrons

  • instruction

    Solution: Charging Fines to Patrons

  • Demo: Charging Fines to Patrons

    2:34

  • Checking Out and Returning a Book

    3 questions

Reviews

Start your review of Practice Object Interaction Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.