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]
3 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]3 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
JAVA- If you have an int as the actual parameters, will it change to fit the parameters if it requires a double, or will the cod
ivann1987 [24]

If you have only 1 method that is not overloaded, then you will not be able to call it with inappropriate parameter types, that is, if the initial type of the parameter is int, then it will not be able to get the double, float, and other values, because of this an error will occur.

For this, method overloading is created.

Method overloading is when you create methods with the same name, but only the content and parameters of the methods are/can-be completely different.

6 0
3 years ago
Lotus 1-2-3 allows the user to record, compare, and organize data. It is often used for creating budgets, tracking sales, and ma
Anvisha [2.4K]
It is a spreadsheet document or software
5 0
3 years ago
Which method is the quickest for removing multiple different indent types applied to a paragraph
White raven [17]

Are there answer choices???? I think the answer would be remove them by using the delete button

5 0
3 years ago
Read 2 more answers
What is the purpose of the domain name? The domain name is an example of a service provider. The domain name .gov.nz is an examp
malfutka [58]

.gov.nz is for New Zealand

6 0
4 years ago
Read 2 more answers
What is the role of memory in a computer​
Anuta_ua [19.1K]

Answer:

Computer random access memory (RAM) is one of the most important components in determining your system's performance. RAM gives applications a place to store and access data on a short-term basis. It stores the information your computer is actively using so that it can be accessed quickly.

5 0
3 years ago
Other questions:
  • The process of starting or restarting a computer or mobile device is called __________.
    5·1 answer
  • How does microchip work
    12·1 answer
  • What does it mean when a red squiggly line appears under a typed word? How do we fix it?
    7·1 answer
  • What is it called when two different files generate the same hashing result?
    15·1 answer
  • Two system administrators who work in two different buildings for the same company want to open a communication channel between
    8·1 answer
  • In discussing inventory, Helena mentions that bikinis for sale on the website are not always in stock. Say customer feedback ind
    15·1 answer
  • File-sharing utilities and client-to-client communication applications can provide the capability to share files with other user
    14·1 answer
  • Assume that car1 is an instance of the Car class, and that the Car class has a member function named park. Write down the call t
    8·1 answer
  • PLEASE GO SUPPORT I JUST STARTED 3 WEEKS AGO AND I GET NO VIEWS
    12·2 answers
  • What do we call exceptions to the exclusive rights of copyright law?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!