1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
777dan777 [17]
3 years ago
5

Suppose you design a banking application. The class CheckingAccount already exists and implements interface Account. Another cla

ss that implements the Account interface is CreditAccount. When the user calls creditAccount.withdraw(amount) it actually makes a loan from the bank. Now you have to write the class OverdraftCheckingAccount, that also implements Account and that provides overdraft protection, meaning that if overdraftCheckingAccount.withdraw(amount) brings the balance below 0, it will actually withdraw the difference from a CreditAccount linked to the OverdraftCheckingAccount object. What design pattern is appropriate in this case for implementing the OverdraftCheckingAccount class
Computers and Technology
1 answer:
Leona [35]3 years ago
6 0

Answer:

Strategy

Explanation:

The strategic design pattern is defined as the behavioral design pattern that enables the selecting of a algorithm for the runtime. Here the code receives a run-time instructions regarding the family of the algorithms to be used.

In the context, the strategic pattern is used for the application for implementing OverdraftCheckingAccount class. And the main aspect of this strategic pattern  is the reusability of the code. It is behavioral pattern.

You might be interested in
These are pictorial images displayed on a computer screen​
Mrrafil [7]

Answerthats nice

(: -With Star

Explanation:

3 0
2 years ago
Why do we use computers?<br><br>​
Nina [5.8K]

Explanation:

Computers are very useful machines..We use it for creating presentations, creating documents, creating many more things that are made nicely by computer..

6 0
3 years ago
Read 2 more answers
What are the differences between sequential and random files? Which one do you think is better and why?
sukhopar [10]

Answer:

Sequential is better

Explanation:

Sequential is more organized while the more easier to make but less dependable one is random.

sequential is used for things such as date of birth, or where someone was born.

you can't do that with a random file.

5 0
4 years ago
Lara sees her colleague taking a bribe from a customer. What should she do?
kondaur [170]
She should report it to the superviser
6 0
3 years ago
Read 2 more answers
Each row in a database is a set of unique information called a(n)
blondinia [14]

A row, which is also called a tuple.

4 0
3 years ago
Read 2 more answers
Other questions:
  • What was Leonardo da Vinci an expert in
    11·1 answer
  • What is the maximum number of communication paths for a team of twenty people?
    5·1 answer
  • My tv is hdtv but it does not show the name of the channels
    15·1 answer
  • What is added to the &lt; meta &gt;tag to describe the encoding type?
    15·1 answer
  • How do you feel about your self as a responsive citizen?​
    7·1 answer
  • You are using a PowerPoint template from your school to present your research findings in front of the class. What would you do,
    13·2 answers
  • What strategies do you use to better understand difficult reading material? Check all that apply.
    5·1 answer
  • 9. Which of the following commands is executed with the shortcut 'Ctrl+Z'?
    11·1 answer
  • Enter the word that belongs in the blank:
    13·1 answer
  • Which key must be pressed in addition to clicking on a hyperlink for it to be followed?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!