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
guapka [62]
3 years ago
15

Name two common methods for performing dependency injection.

Computers and Technology
1 answer:
Andre45 [30]3 years ago
8 0

Answer:

Constructor Injection

Setter Injection

Method Injection

Explanation:

Dependency Injection is to inject all the dependencies required for a class to make it a loosely coupled component from it's dependencies. As the class is loosely coupled from it's dependencies ,changing the logic of dependencies wont effect the class any more.

Constructor Injection: we can inject all the dependencies of the class using constructor

Setter Injection : we will create some properties which will set and return the dependencies of the class

Method Injection: we will create separate method to inject dependencies into the class

You might be interested in
If you delete a conversation many times with someone like this, will you stop receiving messages from them?
GREYUIT [131]

Answer: No

Explanation:

4 0
3 years ago
Write a statement that defines an ifstream object named inputFile and opens a file named "Friends.txt".
Simora [160]

Answer:

ifstream inputFile;

inputFile.open("Friends.txt");

Explanation:

Though, the programming language is not stated, questions like this are often from C++.

The first statement defines the ifstream object using the following syntax.

ifstream [object_name]

In this case, the object name is inputFile

So, the syntax becomes

ifstream inputFile;

The next line opens a file using the following syntax.

[object_name].open("Filename")

Here, object_name is inputFile and filename is Friends.txt

So, the open statement becomes

inputFile.open("Friends.txt")

5 0
3 years ago
Which of the following statements about programmed decisions is FALSE? a. Programmed decisions deal with repetitive situations.
MA_775_DIABLO [31]

Answer:

Option e: The use of programmed decisions should be limited to noncritical situations.

Explanation:

A repetitive decision or routine that can be managed by developed business  procedures or rules are known as programmed decisions. These kind of decisions are most often known for at certain points in a standard process, and are planned relying on recognized and easily identifiable terms. Programmed decisions generally do not demand much consideration or discussion, and can typically be automated to make certain consistency and save time for decision-makers.

So, the use of programmed decisions should not be limited to noncritical situations.

5 0
3 years ago
Por favor alguem poderia me falar se este Computador Gamer Fox PC FPS Intel Core i5 8GB 3.4 GHZ GeForce GTX 1050Ti 4GB GDDR5 HD
AleksAgata [21]

thats an trash computer

5 0
3 years ago
True of False - use T or F An abstract class can have instances created using the constructor of the class.
Sindrei [870]

Answer:

False

Explanation:

An instance of an abstract class cannot be created through the constructor of the class, because it does not have a complete implementation. Though, it is possible to have references of an abstract type class. Abstract classes are incomplete structures and you would have to build onto it before you are able to use it.

7 0
4 years ago
Other questions:
  • The order in which statements are executed during a program run. Answer 1 The first part of a compound statement begins with a k
    12·1 answer
  • Where could an identity theft access your personal information
    9·2 answers
  • Anyone else getting 502 bad gateway on here?
    7·1 answer
  • Which activity might require you to provide your social security number
    8·2 answers
  • _________function tells the cin object to skip one or more characters in the keyboard buffer.
    11·1 answer
  • When is the kids choiceee awads?????????????????????????
    12·2 answers
  • Why does atmospheric pressure does not effect on planes,jet planes and rocket?​
    9·1 answer
  • How do I mark someone brainiest
    9·2 answers
  • Which cyber protection condition establishes a protection.
    12·1 answer
  • List three variables that could be used in creating a model that determines the best day to plant corn in a given location. 30 p
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!