Skip to content

Commit 25a3b76

Browse files
committed
feat(graduated-tiered-pricing): add specification
1 parent b3bd36f commit 25a3b76

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Graduated Tiered pricing
2+
3+
A more advanced variation of the [Tiered Pricing](../tiered_pricing/README.md) exercise.
4+
5+
## User story
6+
7+
Companies want to get Codely subscriptions for their
8+
employees.
9+
10+
We need to calculate the total price of the subscription
11+
given the number of subscription that a company
12+
wants to purchase.
13+
14+
Each subscription has a different unit price, depending
15+
on the tier it belongs to:
16+
17+
| Range | Unit price |
18+
|------:|-----------:|
19+
| 1-2 | 299 € |
20+
| 3-10 | 239 € |
21+
| 11-25 | 219 € |
22+
| 26-50 | 199 € |
23+
| 51+ | 149 € |
24+
25+
For example, if the company wants 3 subscription,
26+
the price of each subscription would be:
27+
28+
| subscription # | Price |
29+
|---------------:|------:|
30+
| 1 | 299 € |
31+
| 2 | 299 € |
32+
| 3 | 239 € |
33+
| **Total** | 837 € |
34+
35+
Here are some examples that can guide you during the
36+
development process:
37+
38+
| Subscriptions | Unit price | Total |
39+
|--------------:|-----------:|--------:|
40+
| 1 | 299 € | 299 € |
41+
| 2 | 299 € | 598 € |
42+
| 3 | 239 € | 837 € |
43+
| 4 | 239 € | 1076 € |
44+
| 5 | 239 € | 1315 € |
45+
| 11 | 219 € | 2729 € |
46+
| 12 | 219 € | 2948 € |
47+
| 13 | 219 € | 3167 € |
48+
| 26 | 199 € | 5994 € |
49+
| 27 | 199 € | 6193 € |
50+
| 28 | 199 € | 6392 € |
51+
| 50 | 149 € | 10770 € |
52+
| 51 | 149 € | 10919 € |
53+
| 52 | 149 € | 11068 € |

0 commit comments

Comments
 (0)