https://github.com/uggla/rust_dojo_01
Coding dojo #1bis in Rustlang
https://github.com/uggla/rust_dojo_01
Last synced: about 1 year ago
JSON representation
Coding dojo #1bis in Rustlang
- Host: GitHub
- URL: https://github.com/uggla/rust_dojo_01
- Owner: uggla
- License: apache-2.0
- Created: 2024-01-24T09:09:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T19:52:51.000Z (over 1 year ago)
- Last Synced: 2025-04-26T03:56:21.882Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 473 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coding Dojo #1bis
## Title: Price Calculation Kata
Goal is to create a module with 2 public fonctions:
- 1 x to calculate the price of items.
- 1 x to covert a price in various currencies.
1- Implement the total price calculation based on the following parameters:
- Number of items
- Unit price
- Tax
2 - Take into account discounts:
- €1000: 3% discount
- €5000: 5% discount
3- Add currency converter:
- 1 € = 2 Krupnic
- 1 € = 3 Zorglub
### Examples
Prices:
- Excl. VAT: 3 items at €1.21 each + 0% ⇒ “€3.63”
- Incl. VAT 5%: 3 items at €1.21 each + 5% ⇒ “€3.81”
- Incl. VAT 20%: 3 items at €1.21 each + 20% ⇒ “€4.36”
Discounts:
- €1000 → 3% Discount: 5 x €345.00 + 10% tax → “€1840.58”
- €5000 → 5% Discount: 5 x €1299.00 + 10% tax → “€6787.28”
Currencies:
- 20€ = 40.00 Krupnic
- 20€ = 60.00 Zorglub
## Proposed editor
The idea is to use on online editor. Gitpod seems a good solution in that
case as only a browser is required to edit the code and the workspace can
be shared between participants.
