# Objects

Objects: Classes and Objects, Interfaces: A Promise Any Class Can Keep, Polymorphism: One Call, Many Behaviors.

Updated: November 17, 2026

1. [Classes and Objects](https://www.ask-codey.com/lessons/ds-code-you-need-classes) (Apprentice): A review of classes and objects in all five languages: a Snack class with fields, a constructor and methods, objects made from it, and the classic shape of a Java program you'll see in textbooks.
2. [Interfaces: A Promise Any Class Can Keep](https://www.ask-codey.com/lessons/dp-interfaces) (Apprentice): When code is written for one class, every new kind of thing means a copy of that code; an interface writes down a promise (a name and a price for some hours) that any class can keep, so the code asks for the promise instead of the class, in C#, Java and TypeScript, with an abstract base class in Python and duck typing in JavaScript.
3. [Polymorphism: One Call, Many Behaviors](https://www.ask-codey.com/lessons/dp-polymorphism) (Apprentice): When the desk checks what kind of vehicle it has before it can price it, every new vehicle means another check, and a forgotten one prices it at $0; polymorphism moves each price into its own class, so one call, rental.price(hours), does the right thing for a bike, an e-bike and a scooter.

Source: https://www.ask-codey.com/courses/design-patterns/topics/dp-objects
