Override the Methods a Parent Method Calls
mediumQuestion 521A Card class is provided. Its summary() method builds a line of text by calling two other methods of the same object, typeName() and fee(). When a subclass overrides those two methods, the inherited summary() picks up the new versions automatically, without being rewritten. Write the subclass GiftCard.
Requirements:
1. GiftCard extends Card. Its constructor takes a double balance and passes it to the Card constructor.
2. Override typeName() to return Gift.
3. Override fee(): a gift card holding 50.0 or more has no fee and returns 0.0, any smaller balance returns 1.0. The balance is private in Card, so read it with the inherited getBalance().
4. Do not write a summary() method in GiftCard. The tests call the inherited one.
Do not change the Card class.
Do NOT write a main method.
Expected output
Basic card: balance 40.0, fee 2.5 Gift card: balance 75.0, fee 0.0
= newline. The output ends with a newline, so print one after the last line.
Your output
Run your code to see the output here...