Skip to content
AgileLogics
Intermediate 5 min read

Intermediate Projects

Prerequisites: Level 2 — Intermediate

Build these using classes, data classes, sealed types, extension functions, exceptions, files, Gradle, JSON, and tests from Level 2. Give each project its own Gradle project with tests.

1. Expense Tracker

Model an Expense data class (amount, category enum, date) and save and load expenses as JSON with kotlinx.serialization. Print a monthly report grouped by category with groupBy and sumOf. Validate amounts with require, and cover the logic with kotlin.test.

2. Library Management System

Model books, members, and loans with data classes, and represent the outcome of borrowing with a sealed interface (Borrowed, NotAvailable, LimitReached). Use an exhaustive when to print a message for each outcome.

3. File Organizer

Walk a folder with File.walk(), and move files into subfolders by extension (images/, documents/, other/). Add a --dry-run option that only prints what would happen.

4. Text Statistics Library

Write a set of extension functions on String — word count, sentence count, reading time, most common words — in a library module, with a thorough test suite, and a small command-line app module that uses it.