CJCoding With Joseph
15free / daySign inCreate account

OnlineSubscription calcMonthlyCost

Update this class called OnlineSubscription that extends Subscription. You need to finish the calcMonthlyCost method.

Rules for calcMonthlyCost():
- If multipleUsersAllowed is true, return basePrice + 5
- Otherwise return basePrice

Do NOT write a main method. A hidden Main will test your class. The Subscription base class is provided.

Expected Output:

25.0

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
Classes
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.