This course is designed for novices in Kotlin and focuses on the object-oriented (OOP) concepts of the Kotlin language. This is the second module of the course, the first module can be found on JetBrains Marketplace. This module assumes that you are already familiar with all the constructs discussed in the first part.
Each lesson of the course is built in the form of a web project: step by step, by completing different small tasks, you will get a functional project in the end. At the end of each lesson, an additional similar project will be offered: it includes all the topics of the lesson but does not contain the theory part.
Note, this course does not provide a detailed explanation of the OOP concepts, it just shows how to use them in Kotlin and can briefly remind you the definitions.
All topics will be accompanied by links to the official Kotlin documentation, which you can read later.
Topics covered:
- packages;
- classes, properties, and member functions;
- type aliases;
- value and data classes;
- companion objects;
- extension functions;
- objects;
- initializer blocks;
- enum classes;
- functional interfaces (Single Abstract Method, SAM);
- interfaces and inheritance;
- some built-in functions to handle errors and work with collections.
After this course, you will be ready to write basic Kotlin applications.
Before starting this course, check the following requirements.
- Your computer needs to have a stable internet connection.
- Git version control system needs to be installed on your computer (link to the git site: https://git-scm.com/).
- Make sure that the path to the root folder of the course does not contain spaces, special characters, or non-Latin characters.
- Make sure that you use the Intellij IDEA with version at least
2023.1.1
. - Make sure that you use the EduTools plugin with version at least
2023.1
. - To be able to run web applications, you need to have a web browser. We recommend using Google Chrome.
The course is integrated into the Intellij Idea IDE, which has a free Community license. You can use this license to complete the course. If you have some troubles with the course installation, feel free to contact us by email at [email protected].
This module is dedicated to the creation of popular board games. During this module, you will develop four games:
- Alias. The goal of this game is to recreate the well-known Alias game, where a card with words is generated for one player and other players need to guess these words.
- Word generator. The goal of this game is to generate a card with a long word, and the task for the teams is to come up with as many words as possible using the letters of the original one (not necessarily all of them).
- Codenames. The purpose of this project is to implement the popular board game Codenames. In this game, the players are split into two teams. Each team chooses a leader and tries to guess all the words of its team color in fewer attempts than the other team.
- Memory trainer. This application will allow you to train your memory and memorize countries and their capitals.
This course is available on JetBrains Marketplace and can be installed from the IntelliJ IDEA IDE directly, but you can also use it in the Course Creator mode or create a course archive from the source code.
You can create a course preview from the source code:
- Clone the repository:
git clone https://github.com/jetbrains-academy/kotlin-onboarding-part2.git
-
Run yarn install in each module with frontend.
-
Build the project:
./gradlew build
-
Install the EduTools plugin from JetBrains Marketplace.
-
Create a new course preview.
You can create a course archive from the source code:
- Clone the repository:
git clone https://github.com/jetbrains-academy/kotlin-onboarding-part2.git
- Build the project:
./gradlew build
-
Install the EduTools plugin from JetBrains Marketplace.
-
Create a new course archive.
To run tests locally, you just need to build the project and run the following command:
./gradlew test
The tests use the Java Reflection API under the hood to check the user's tasks.
If you have questions about the course or the tasks or if you find some errors, you can ask questions and participate in discussions in repository issues.
Please be sure to review the project's contributing guidelines to learn how to help the project.