CJCoding With Joseph
15free / daySign inCreate account

An abstract class can hold finished methods next to abstract ones. BankCard leaves network() abstract and gives monthlyFee() a body that returns 5.0. A subclass must complete the abstract method, and it may also override a finished one. RegularCard keeps the inherited fee. Complete StudentCard, which does not.

Requirements: 1. network() returns Interac. 2. Add an override of monthlyFee() to StudentCard that returns 0.0. Use the same header as the method in BankCard. 3. Leave describe() alone. It calls both methods and picks up your versions.

Do not change BankCard or RegularCard.

Do NOT write a main method.

Expected output

Interac card, fee 0.0
Visa card, fee 5.0

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

Hints2 available
Topics
Abstract ClassesClasses
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.