Java Practice It | Exercise 9.9 MinMaxAccount | classes, implementing, inheritance, instance method

preview_player
Показать описание
More practice its:

Problem:

Question:
A company has written a large class BankingAccount with many methods including:

Method/Constructor Description
public BankingAccount(Startup s) constructs a BankingAccount object using information in the Startup object s
public void debit(Debit d) records the given debit
public void credit(Credit c) records the given credit
public int getBalance() returns current balance in pennies
Design a new class MinMaxAccount whose instances can be used in place of a BankingAccount object but include new behavior of remembering the minimum and maximum balances ever recorded for the account. You should provide the same methods as the superclass, as well as the following new behavior:

Method/Constructor Description
public MinMaxAccount(Startup s) constructs a MinMaxAccount object using information in the Startup object s
public int getMin() returns minimum balance in pennies
public int getMax() returns maximum balance in pennies
The account's constructor sets the initial balance based on the Startup information. Assume that only the debit and credit methods change an account's balance.
Рекомендации по теме
Комментарии
Автор

Am I dumb if I didn't understand this question? I know inheritance and what not but for some reason without the BankingAccount class I just could not mentally visualize/understand the question.

ThatGuy