In Kotlin, it warns you when calling an abstract function in a constructor, citing the following problematic code:
abstract class Base { var code = calculate
To invoke the functions of the concrete classes in the abstract class use by lazy which allows calling non-final functions.
by lazy
From: area = extractArea(room);
area = extractArea(room);
To: area by lazy { extractArea(room) }
area by lazy { extractArea(room) }
GL