Back to Pathways
OOP Studio Ages 9-15

Blueprint to Object

Students learn that a class is a blueprint and an object is one thing made from that blueprint.

15-20 min Ages 9-15 OOP JavaScript

Blueprint → Object

A class is the blueprint; an object is the thing built from it. The blueprint for a Creature says "every creature has a name and a sound, and knows how to speak." Then new builds Pixel — a real creature you can talk to.

class Creature new 🤖 Pixel
  1. 1

    The blueprint never beeps

    class Creature { ... } is just a plan — it describes names, sounds, and a speak() action, but no creature exists yet. Blueprints don't make noise; buildings do.

  2. 2

    new builds the real thing

    let pixel = new Creature("Pixel", "beep"); runs the constructor and hands you an actual object. Now pixel.speak() makes a real creature say a real beep.

  3. 3

    Try it

    Stamp out a second creature — new Creature("Echo", "boop") — and make both speak. One blueprint, many creatures, each with its own name and sound.

Code Editor

Make one object from a blueprint.

Example code
class Creature {
  constructor(name, sound) {
    this.name = name;
    this.sound = sound;
  }

  speak() {
    say(this.name + " says " + this.sound);
  }
}

let pixel = new Creature("Pixel", "beep");
pixel.speak();
Output

Program result

Robot ready to speak your strings

Type real JavaScript, then run it.