Skip to content

nehac8912/Coffee-Machine-simulator

Repository files navigation

Coffee-Machine-simulator

Coffee Machine

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 will work on programming a coffee machine simulator. 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.

Learning outcomes

This project allows to get a taste of Java. Practice working with classes, challenge yourself with loops and conditions, and get more confident in Java.

Result will look like

ezgif com-video-to-gif

STAGE 1 “HELLO, COFFEE

A program that puts basic information on the screen: give the machine a chance to tell the customers what it’s doing!

STAGE 2 “MACHINES HAVE NEED”

Program the machine to calculate the amount of ingredients it needs depending on how many people want some coffee.

STAGE 3 “ENOUGH COFFEE FOR EVERYONE”

Working with conditions, program the machine to estimate how many creamy coffees it can make based on the amount of ingredients we enter.

STAGE 4 “ACTION!”

set the machine to perform three basic actions: collect the money, renew the supplies, and serve the coffee.

STAGE 5 “ON A COFFEE LOOP”

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”.

STAGE 6 “BRUSH UP THE CODE”

Time for some final touch-ups: structure the code so that it runs smoothly. Using enums

About

this project is the simulation of a real world coffee machine which is implemented using java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages