# Objects & Classes **Track:** Objects, Data Structures & Algorithms — Creative Coding — the existing 50 **Framework / surface:** p5.js **Level:** Intermediate **Prerequisites:** Functions & Modularity, Arrays **In one line:** Bundle data and behaviour into a reusable entity. ## Theory, aesthetics & inspiration A class is a template that fuses state and behavior into a single named thing; an object is one instance of it, carrying its own data while sharing the class's methods. The idea descends from Simula, devised by Ole-Johan Dahl and Kristen Nygaard to model the world as interacting agents, and from Alan Kay's Smalltalk, which reframed computing as message-passing between objects. For an artist who codes, encapsulation is an aesthetic act: a Mover or Particle becomes a unit of intention, and the program's structure begins to mirror the scene it renders. Daniel Shiffman's "The Nature of Code" treats this bundling as the first step toward simulating living systems.