All days
Day 03Module 2 · OOP in Kotlin· 3–5 hrs
OOP I — Classes, Constructors, Inheritance, Polymorphism
Object-oriented programming Kotlin-style: concise classes, primary and secondary constructors, custom getters/setters, and inheritance with overriding.
0% done
Key concepts
- class and data class
- Primary constructor (in class header)
- Secondary constructors
- Custom get() / set()
- open class / open fun — inheritance is opt-in
- override and super
- Runtime polymorphism
Lectures in this day
- 01
Class and Object Definitions
A class is a blueprint that says what a thing has (properties) and what it can do (functions). An object is an actual thing made from that blueprint. A `data class` is a shortcut for classes that mostly just hold data — Kotlin writes the boring bits for you.
Real life · One blueprint of a house (the class) can be used to build many real houses (the objects).kotlin