https://github.com/medunes/cigarette-machine
Coding dojo, you know!
https://github.com/medunes/cigarette-machine
Last synced: 6 months ago
JSON representation
Coding dojo, you know!
- Host: GitHub
- URL: https://github.com/medunes/cigarette-machine
- Owner: MedUnes
- Created: 2021-02-18T00:56:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-18T00:58:24.000Z (over 4 years ago)
- Last Synced: 2025-03-22T19:01:47.905Z (7 months ago)
- Language: PHP
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cigarette Machine
![]()
[](https://github.com/MedUnes/cigarette-machine/actions?query=workflow%3A%22build%22)
[](http://medunes.net)
[](https://codecov.io/gh/medunes/cigarette-machine/branch)
[](https://shields.io/#/)
[](https://shields.io/#/)
[](https://shepherd.dev/github/MedUnes/cigarette-machine/coverage.svg)### Setup
System requirements:
- PHP 7.4
- Composer### Intro
Hi and welcome to limango! You're now going to participate in
a short coding test to test to your ability to think logical,
to work independently with a given situation or environment and
develop in a smart, goal-oriented way.### Task
Your product owner has given you the task of developing a
small CLI cigarette machine. The input should be the amount
of packs a potential customer could want and the amount he is
going to give. The price per cigarette pack is a static -4,99€.
You *dont* have to think about currencies, there are only €!The result should be printed on the screen with the count and
the total amount of the purchased packs as well as a table
which tells the customer in which coin combination he is going
to get his change.Example:
```
╭─vicgey@limango:/home
╰─$ php bin/console purchase-cigarettes 2 10.00You bought 2 packs of cigarettes for -9,98€, each for -4,99€.
Your change is:
+-------+-------+
| Coins | Count |
+-------+-------+
| 0.02 | 1 |
+-------+-------+
```#### Pitfalls
Think of scenarios like "less money given than total cost of
amount" and please use the predefined project structure
(command,interfaces etc.)