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
slava [35]
2 years ago
5

Suppose you are developing a data visualization application DataViz which calls some functions from a statistics library class S

uperStats. You recently heard about another statistics library UberStats with supposedly significantly better performance than SuperStats. Explain how you would redesign the DataViz class using the Adapter pattern so that DataViz can be configured at runtime to use either SuperStats or UberStats. Does your design use dependency inversion and/or dependency injection? Explain
Computers and Technology
1 answer:
Nadusha1986 [10]2 years ago
4 0

Answer:

By using dependency injection, create the adapter to adapt both the DataViz and the UberStats interface as expected.

Explanation:

Adapters are used in Objected-oriented programming to run or convert the output of one class object to another. The DataViz class currently uses the SuperStats class as an adaptee to get and output statistical results.

Write a new code from the scratch is tedious, so, the UberStats class dependencies are injected in the adapter and the DataViz and UberStats class functionalities can be experimented with.

You might be interested in
ANYONE WANNA FRIEND ME ON DISCORD ゴRose joestarゴ#2088
Sergeeva-Olga [200]

JOJO fan!?!!?!??!?!?!!?!?

6 0
3 years ago
30% of the mass of an objects is 24 kilograms. use this fact to find:
Triss [41]

Answer:

chemați. mfvd5. fn. cfcfcfcfcfcfcf 4t

6 0
2 years ago
What impact does unemployment have on the economy?
Kazeer [188]

Answer:

<h2>A negative impact.</h2>

Explanation:

The unemployed are also unable to purchase as many goods, so will contribute to lower spending and lower output. A rise in unemployment can cause a negative multiplier effect.

8 0
3 years ago
Read 2 more answers
Betty was sitting at a coffee shop reading her favorite book. She heard an explosion nearby. In a few, she could hear ambulance
enot [183]
B or D are the options I would suggest.
4 0
2 years ago
Read 2 more answers
How to do assignment 5 on edhesive please help
Shalnov [3]

Answer:

//To enter a string, and enter a pivot string, and then print in required sequence, the string from pivot string to last as first string, and printed before the left portion of string.

import java.util.Scanner;

public class Main {

 public static void main(String args[]) {

   Scanner s1 = new Scanner(System.in);

   System.out.println("Enter Main String:");

   String f1 = s1.nextLine();

   System.out.println("Enter pivot(string):");

   String piv = s1.nextLine();

   int start1 = f1.indexOf(piv);

   int end1 = piv.length()+start1;

   if (start1 == -1){

     System.out.println("Error: Sub string(Pivot) cannot be found.");

     return;

   }

   String first1 = f1.substring(0,start1-1);

   String second1 = f1.substring(end1);

   if (f1.charAt(start1-1)==' '){

     System.out.println(second1 + " " + piv + " " + first1);

     return;

   }

   System.out.println(second1 + piv + first1);

   

 }

}

Explanation:

Please check the answer section

8 0
3 years ago
Other questions:
  • What branch of science helps avoid or minimize stress-related injuries at workplace?
    6·1 answer
  • Which of the following is a typical concern for developers while using prototypes?
    6·2 answers
  • If a company's IS-related programs are not developed in-house, then the development group of the IS department will be staffed p
    6·1 answer
  • Hello! I am a new coder, so this is a simple question. But I am trying to create a code where you enter a number, then another n
    8·1 answer
  • Which path needs to be followed to change the currency settings of Windows Operating System?
    14·1 answer
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • What are the significances of blogs?
    7·2 answers
  • Is jesus dead or alive
    11·1 answer
  • 15 _____ 3 = 0 Question 11 options: a) / b) % c) * d) //
    12·1 answer
  • Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!