All days
Day 04Module 2 · OOP in Kotlin· 3–5 hrs
OOP II — Abstract, Interfaces, Object, Companion Object
Interfaces vs abstract classes, Kotlin's `object` (singleton) and `companion object` (like Java statics). A common interview topic — get the mental model right.
0% done
Key concepts
- abstract class & abstract fun
- interface with default implementations
- When to use interface vs abstract class
- object declaration (singleton)
- companion object (per-class statics)
- sealed class basics
Lectures in this day
- 01
Abstract Class and Method
An `abstract` class is a blueprint that is not complete on its own. You can't build one directly — you must first create a child class that fills in the missing pieces. An `abstract` function has no body; each child MUST write one.
Real life · The idea of 'Vehicle' is not something you can drive. You drive a real Car or Bike. But every Vehicle must be able to start.kotlinabstract class Vehicle(val name: String) { abstract fun start() 0