Project

Coffee Machine Simulator with Java

Hard
11790 completions
~ 14 hours
4.5

Program a virtual barista to get a taste of Java. You'll create a functional program and gain experience in working on complex coding tasks.

Provided by

JetBrains Academy JetBrains Academy

About

What can be better than a cup of coffee during a break? A coffee that you don’t have to make yourself. It’s enough to press a couple of buttons on the machine and you get a cup of energy; but first, we should teach the machine how to do it.
In this project, you'll program a coffee machine simulator using Java. The machine works with typical products: coffee, milk, sugar, and plastic cups; if it runs out of something, it shows a notification. You can get three types of coffee: espresso, cappuccino, and latte. Since nothing’s for free, it also collects the money.
This project allows you to better understand the basic OOP, its main concepts such as classes, class methods and attributes, and get a taste of Java. Practice working with methods, challenge yourself with loops and conditions, and get more confident with OOP.

Graduate project icon

Graduate project

This project covers the core topics of the Introduction to Java course, making it sufficiently challenging to be a proud addition to your portfolio.

At least one graduate project is required to complete the course.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Write a program that puts some basic information on the screen: let the machine describe what it takes to make a cup of coffee!
Program the machine to calculate the amount of ingredients it needs depending on how many people want some coffee.
Working with conditions, program the machine to estimate how many creamy coffees it can make based on the amount of ingredients we enter.
Teach your virtual coffee machine to perform three basic actions: collect the money, renew the supplies, and serve the coffee.
Program the machine to display on the screen the amount of supplies left. Set the main loop: now the menu keeps updating until you enter “exit”.
Time for some final touch-ups: structure the code so that it runs smoothly.

Reviews

Michael Voggenreiter
7 hours ago
Was ok so far. But I already structured the project from the beginning instead of the step where is was afforded.
Roman Torop avatar
Roman Torop
1 week ago
Good interesting and useful project. It helped me to repeat what I've learned in practice.
Dmitry Kabanov
1 week ago
I got experience of working with Java in this project. I have also realized that my understanding of how OOP works in Java (I program mostly in Python) was slightly off, as protected variables are not getting overridden in subclasses as I though before (this is what happens in Python).

4.5

Learners who completed this project within the Introduction to Java course rated it as follows:
Usefulness
4.5
Fun
4.5
Clarity
4.4