Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 495 Bytes

README.md

File metadata and controls

8 lines (5 loc) · 495 Bytes

Kotlinish composition over inheritance

This is a small example of the composition over inheritance principle in kotlin.

This repository contains a CountingSet which keeps track of the total number of added elements. The inheritance based approach has one failing test left because the addAll-method do not work like expected. This problem can be solved using the by keyword in kotlin.

📚 Resources