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
Which of the following domestic appliances does not use a magnet?
alekssr [168]
Pressing iron isn’t domestic appliances
7 0
3 years ago
Read 2 more answers
Alice has an item x and Bob has a set of five distinct items y1, y2, y3, y4 and y5. Design a protocol through which Alice (but n
lukranit [14]
I guess it will be 4 yards each hopes it will help u :)
4 0
2 years ago
What makes up the cloud in cloud computing ?
gayaneshka [121]

Answer:

storage

Explanation:

hope this helps

8 0
3 years ago
Which of the instances below is an example of a Trojan horse? Question 2 options: a) An attachment in an email that is really a
sergij07 [2.7K]

Game-theif Trojans is the malware that makes a backdoor into your email account by which you are playing a game or has downloaded it and thus by this all information of user is exposed.

So option D is the answer.

Option A cannot be answer because Trojan does not use files for its purpose.

Option B cannot be a good option because Trojan works in online could.

Option C cannot be a option because Trojan does not need executable to attack your account.

3 0
3 years ago
Read 2 more answers
Write a while loop that lets the user enter a number. The number should be multiplied by 10, and the result assigned to a variab
pentagon [3]

Answer:

#include <stdio.h> // header file inclusion

int main() // main function declaration

{

    int number,product=0; // variable declaration

    while(product<100) // while loop

   {

       scanf("%d",&number); // input a number

       product= number*10; // multiply the number by product

       printf("%d\n",product); // print the value of product

   }

 return 0; // return statement

}

Output:

  • If the user enter 10 then the loop terminates for the first time and the output is 100.
  • If the user enter 5,10 then the loop executes in 2 times and the output is 50 and 100.

Explanation:

  • Firstly there is an inclusion of header file which understands the meaning of printf() and scanf() function.
  • Then there is the main() function definition
  • Then we declare a two-variable (number and product) of integer type.
  • Then we define a while loop and check the condition that product value is less than 100 or not.
  • Then we take input and multiply by 10.
  • Then we assign the value in the product and print the product value.
6 0
3 years ago
Other questions:
  • Imagine that you are an independent filmmaker making a feature-length narrative film in the United States, with a variety of bot
    11·2 answers
  • ________ is the information about a file.
    7·1 answer
  • What are the three types of network topologies used today?
    13·1 answer
  • What is the proper course of action for the following scenario? You want to expand a computer’s capability to play and process v
    8·1 answer
  • 6.6 Write a function named timesTen. The function should have an integer parameter named number. When timesTen is called, it sho
    7·1 answer
  • Citing the recent increase in earnings by several computer companies, economists feel that a cycle has begun in which personal c
    13·1 answer
  • Suppose that for an experimental device setup we have to choose settings for three parameters. There are 4, 3 and 5 settings for
    11·1 answer
  • python Create a new qualitative variable, called Elite, by binning the Top10perc variable. We are going to divide universities i
    6·1 answer
  • Give the names of two different places you might find a number represented in hexadecimal
    6·1 answer
  • I need a 75 word Radio Ad on Why Technology should be kept in a schools budget.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!