PdfPrep.com

How should you complete the code?

HOTSPOT

You are writing a Java class named SavingsAccount.

The class must meet the following requirements:

– Inherit from an existing class named Account

– Include a constructor that uses the base class constructor to initialize the starting balance

– Include a substitute toString() method

How should you complete the code? To answer, select the appropriate code segments in the answer area. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

References:

https://www.tutorialspoint.com/java/java_inheritance.htm

Exit mobile version