File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
exercises/graduated_tiered_prices Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 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 € |
You can’t perform that action at this time.
0 commit comments