โ Back to Classes
Question 123
OnlineSubscription calcMonthlyCost
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
Topics:
Classes
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.