subject

Min MaxAccount
Language/Type: Java classes implementing inheritance instance methods
Related Links: BankingAccount. java
Author: Robert Baxter
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 objects 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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1Γ—10-9m), and a human hair is about 1Γ—10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
You know the right answer?
Min MaxAccount
Language/Type: Java classes implementing inheritance instance methods
R...
Questions
question
Biology, 15.01.2021 07:40
question
Mathematics, 15.01.2021 07:50
question
Mathematics, 15.01.2021 07:50
Questions on the website: 13722367