Skip to content

Commit 1e962df

Browse files
committed
feat(tiered_pricing): 🔵 refactoring promote Tier to package-private scope
1 parent b0652f6 commit 1e962df

File tree

1 file changed

+5
-5
lines changed
  • exercises/tiered_pricing/solutions/oflorez/src/main/java/tv/codely/checkout

1 file changed

+5
-5
lines changed

exercises/tiered_pricing/solutions/oflorez/src/main/java/tv/codely/checkout/Tier.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package tv.codely.checkout;
22

33

4-
public enum Tier {
4+
enum Tier {
55

66
FIRST(1,2,299),
77
SECOND(3,10,239),
@@ -19,19 +19,19 @@ public enum Tier {
1919
this.unitPrice = unitPrice;
2020
}
2121

22-
public int getLowerLimit() {
22+
int getLowerLimit() {
2323
return lowerLimit;
2424
}
2525

26-
public int getUpperLimit() {
26+
int getUpperLimit() {
2727
return upperLimit;
2828
}
2929

30-
public int getUnitPrice() {
30+
int getUnitPrice() {
3131
return unitPrice;
3232
}
3333

34-
public static int getTotalPrice(int subscriptions) {
34+
static int getTotalPrice(int subscriptions) {
3535
var found = FIRST;
3636
for (Tier tier : values()) {
3737
if ( subscriptions >= tier.lowerLimit && subscriptions <= tier.upperLimit) {

0 commit comments

Comments
 (0)