Courses / Mobile development / Kotlin Programming

Free courseSelf-paced

Kotlin Programming

Build, test and package a null-safe Kotlin command-line application with coroutines and file-backed storage.

  • Who it's for. Beginners who have finished Programming Problem Solving (or know basic programming in any language) and want to learn Kotlin.
  • Before you start. Completion of Programming Problem Solving (reading and tracing short programs, variables, conditions, loops, lists) or a demonstrated equivalent in any language.
  • 41 to 68 hours of study with practice
  • 9 modules, 72 lessons
  • 6 guided projects and a final project

What you'll learn

  • Compile, run and package Kotlin programs with kotlinc and a Gradle Kotlin/JVM project, and read compiler and test output.
  • Write control flow, functions with default, named and vararg parameters, and explicit error handling.
  • Model domains with classes, interfaces, data classes, enums and sealed hierarchies with exhaustive when.
  • Write, order, cancel and test basic coroutines with structured concurrency and virtual time.
  • Build, test, package and demonstrate a Kotlin application, and read Android-style Kotlin.

Skills you'll gain

  • Kotlin workspace
  • Types
  • nullability
  • Control flow
  • functions
  • Collections
  • lambdas
  • Classes
  • interfaces
  • Extensions
  • generics
  • Coroutines fundamentals
  • Files
  • tests

Tools you'll use

  • Kotlin
  • kotlinc
  • Gradle
  • kotlin.test
  • kotlinx.coroutines

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 9 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 7 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Typed command-line calculator and report

    Covers Kotlin workspace, Types and nullability and Control flow and functions.

    You build: Typed command-line calculator and report: Gradle project that reads values from args, prints a templated report and uses safe calls and Elvis for optional values.

  2. 02

    Module 4

    Collection analyser for order data

    Choose List, Set and Map correctly, write lambdas and higher-order functions, and transform data with the standard collection operations, predicting results exactly.

    You build: Collection analyser for order data: Totals per customer, grouped days, formatted summary via joinToString, with empty-list behaviour.

  3. 03

    Module 5

    Domain model with sealed states

    Model domains with classes, interfaces, inheritance, data classes, enums, sealed hierarchies and objects, and use exhaustive when over sealed types.

    You build: Domain model with sealed states: Entity classes with validated init, interface with default, abstract hierarchy.

  4. 04

    Module 6

    Generic utilities library

    Extend existing types with extension functions and properties, use the standard scope functions, and write generic classes and functions with bounds and variance.

    You build: Generic utilities library: Extension functions and properties plus justified scope functions; Bounded generic class, in/out pair and star-projection inspector.

  5. 05

    Module 7

    Concurrent quote fetcher with tests

    Write, order, cancel and test basic coroutines with kotlinx.coroutines: suspend functions, launch, async, scopes, jobs, dispatchers and runTest.

    You build: Concurrent quote fetcher with tests: Suspend functions, launch/async quotes under coroutineScope, cancellable ticker.

  6. 06

    Module 8

    File-backed grade book with fake-source tests

    Write kotlin.test tests with Gradle, read and write text files safely, parse input without crashing, and isolate file access behind interfaces so logic is testable.

    You build: File-backed grade book with fake-source tests: kotlin.test suite with boundaries, temp-directory file tests.

  7. 07

    Module 9

    Kotlin application with null-safe models, coroutines and tests

    Plan, build, test, package and demonstrate a null-safe Kotlin application with coroutines, and read Android-style Kotlin code.

    You build: The final project, demonstrated to a trainer.

Full curriculum

9 modules and 72 lessons, 41 to 68 hours of study

01Kotlin workspace7 lessons, 3 to 5 hours

Lessons

  • Compile one file with kotlinc and run the jar
  • Read a compiler error with file, line and message
  • Create a Gradle Kotlin/JVM project and its layout
  • Declare values with val and var and let the compiler infer types
  • Print values with string templates and read input
  • Explore code with the REPL and kotlin scripts
  • Run the Gradle test task and open the test report

After this module you can

  • Compile a single hello.kt with kotlinc -include-runtime -d and run the jar with java -jar, then state what -include-runtime adds.
  • Locate the file, line and message of a kotlinc error in a program with one unresolved name and one type mismatch, and fix both.
  • Run the Gradle test task on a project with one passing and one deliberately failing test and locate the HTML report.
02Types and nullability8 lessons, 4 to 6 hours

Lessons

  • Numeric types and explicit conversions
  • Integer division, remainder and overflow
  • Strings, characters and templates
  • Nullable types and the compiler's null check
  • Safe calls and the Elvis operator
  • Smart casts, safe casts and the cost of !!
  • The let function for null-guarded blocks
  • Platform types and nullability at Java boundaries

After this module you can

  • Choose between Int, Long and Double for given quantities and convert explicitly with toLong, toDouble and toInt, predicting which implicit assignments the compiler rejects.
  • Predict results of integer division, remainder and Int overflow for chosen boundary values and make a computation safe by widening to Long first.
  • Explain why a value returned by a Java method can cause a NullPointerException in Kotlin, and write a defensive Kotlin boundary that declares the type as nullable.
03Control flow and functions9 lessons, 4 to 6 hours

Lessons

  • if as an expression
  • when with subjects, ranges and conditions
  • Ranges, for loops and indexes
  • while loops, break, continue and loop invariants
  • Function declarations: parameters, return types and expression bodies
  • Default and named arguments
  • vararg parameters and the spread operator
  • Exceptions: try as an expression, require, check and Nothing
  • Recursion and tailrec

After this module you can

  • Use if/else as an expression that yields a value, and explain why the else branch is mandatory in that form.
  • Replace chains of if/else with when over a subject and over free conditions, using values, ranges, and several values per branch.
  • Write a recursive function, convert a suitable one to tailrec, and recognise calls that cannot be tail-recursive.
04Collections and lambdas8 lessons, 4 to 6 hours

Lessons

  • List, Set and Map, and read-only versus mutable
  • Lambdas, function types and trailing-lambda syntax
  • filter, map and mapNotNull
  • Aggregation: fold, reduce, count, any and all
  • groupBy, associateBy and associateWith
  • zip, flatMap and joinToString
  • Sequences and lazy evaluation
  • Closures, captured variables and returns from lambdas

After this module you can

  • Pick List, Set or Map for a requirement, create read-only and mutable versions, and explain why a val holding a mutable list can still change.
  • Write lambda expressions, store them in values of function types, and call functions that take a lambda as their last parameter.
  • Explain how a lambda captures and modifies outer variables, and use labelled returns and non-local returns correctly in forEach and filter.
05Classes and interfaces9 lessons, 4 to 6 hours

Lessons

  • Classes, primary constructors and properties
  • Initializer blocks, validation and constructor order
  • Secondary constructors and when defaults are better
  • Interfaces with default members and conflict resolution
  • Inheritance: open, abstract and override
  • Data classes: generated members, copy and destructuring
  • Enums, sealed classes and exhaustive when
  • object declarations and companion objects
  • Visibility modifiers and designing small public APIs

After this module you can

  • Declare a class with a primary constructor whose val and var parameters become properties, and distinguish them from plain constructor parameters.
  • Predict the order of property initialisers and init blocks and use init with require to reject invalid objects.
  • Apply private, protected, internal and public to a small module and explain what each hides from callers.
06Extensions and generics7 lessons, 3 to 5 hours

Lessons

  • Extension functions and static dispatch
  • Extension properties and nullable receivers
  • Scope functions: let, run, apply, also and with
  • Generic classes and functions
  • Type-parameter bounds and where clauses
  • Variance: in, out and read-only collections
  • Type erasure, star projection and reified type limits

After this module you can

  • Write an extension function, call it on a receiver, and predict which function runs when a member and an extension compete or when the declared type differs from the runtime type.
  • Add an extension property with a getter and write an extension on a nullable receiver that handles null inside its body.
  • State what generic type information exists at run time and write type checks that compile using star projections.
07Coroutines fundamentals8 lessons, 4 to 6 hours

Lessons

  • Suspend functions and the coroutines dependency
  • runBlocking and launch
  • async, await and sequential versus concurrent timing
  • coroutineScope and structured concurrency
  • Job, join and cancellation
  • Failure in a scope and handling errors around await
  • Dispatchers and withContext
  • Testing coroutines with runTest and virtual time

After this module you can

  • Add kotlinx-coroutines-core to a Gradle project, write a suspend function that calls delay, and explain why suspend functions can only be called from other suspend functions or a coroutine.
  • Use runBlocking as a bridge from plain code and launch to start a child coroutine, and predict the print order produced by different delays.
  • Write a test with kotlinx-coroutines-test runTest that checks both a result and elapsed virtual time without waiting in real time.
08Files and tests8 lessons, 4 to 6 hours

Lessons

  • Writing the first kotlin.test tests
  • Designing test cases: boundaries, tables and isolation
  • Reading text files with readText, readLines and use
  • Writing files and testing with temporary directories
  • Parsing text safely with toIntOrNull and error reports
  • Modelling parse results with a sealed Result type
  • Isolating I/O with interfaces and fakes
  • Reading Gradle test reports and configuring the test task

After this module you can

  • Write @Test functions with assertEquals and assertFailsWith in a Gradle project and run them with the test task.
  • Derive test cases from boundary values and equivalence classes, express them as a table of inputs and expected values, and keep tests independent.
  • Interpret the console summary and HTML report of a failing run and explain what the test configuration lines in build.gradle.kts do.
09Application project8 lessons, 4 to 6 hours

Lessons

  • Specifying the application and its model types
  • Input parsing and validation layer
  • Storage layer behind an interface
  • Coroutine-based service layer
  • Command-line interface and wiring
  • Test suite review and failure analysis
  • Reading Android-style Kotlin
  • Packaging, running and demonstrating the project

After this module you can

  • Write a one-page specification for the capstone application and define its null-safe model types as data classes, enums and a sealed result.
  • Implement the parsing layer that turns raw lines or records into model objects or typed failures, with unit tests.
  • Build the final jar or Gradle distribution, run it from a clean directory with the documented commands, and prepare the trainer-reviewed demonstration.

What you'll build

6 guided projects along the way, then a final project.

  • Typed command-line calculator and report

    after module 3
  • Collection analyser for order data

    after module 4
  • Domain model with sealed states

    after module 5
  • Generic utilities library

    after module 6
  • Concurrent quote fetcher with tests

    after module 7
  • File-backed grade book with fake-source tests

    after module 8

Final project

Kotlin application with null-safe models, coroutines and tests: a command-line application with model types, a validating parser, a file-backed repository behind an interface, a concurrent service layer and a tested command interface..

What you submit

Source and artifact submission: complete Gradle project, README and sample input and output files Functional checks: at least three commands, parser failure reasons and a concurrent refresh with timing asserted in runTest.

How it's reviewed

Trainer review against a weighted rubric: correctness null_safety_and_modelling concurrency tests reproducibility.

Where you'll use it

  • Model order or record data with data classes and sealed states so invalid states cannot compile.
  • Write tests for parsing and file access so bad input is reported instead of crashing the app.

Roles that use these skills

  • Kotlin developer
  • Android developer (foundation)
  • Backend developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

What should I know before starting?

The course expects Programming Problem Solving or an accepted equivalent. Completion of Programming Problem Solving. A short diagnostic check is described in the entry requirements.

What do I build for the final project?

You choose one of 3 options: Course-timetable viewer; Expense ledger; Library loan desk. It is reviewed by a trainer in a live demonstration.

When do I get a certificate?

Only after you build and demonstrate your live project. OUTLEARN staff issue certificates; nothing is issued automatically.

Be first in when Kotlin Programming opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
FreeOpens soon
Notify me