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
True or False? A supervisory control and data acquisition (SCADA) device is a computer that controls motors, valves, and other d
Gekata [30.6K]

Answer:

The correct answer to the following question will be "True".

Explanation:

SCADA is a hardware and software elements program that permits industrial enterprises to:

  • Agricultural processes are regulated locally or globally.
  • The human-machine interaction program specifically interfaces with equipment such as cameras, switches, generators, motors and much more.
  • Track, store, and process the data in real-time.

Therefore, the given statement is true.

4 0
3 years ago
Examine the efficiency the various recovery algorithms used in deadlock handling
sineoko [7]

Solution:

The process of transaction can guarantee the reliability of business applications. Locking resources is widely used in distributed transaction management (e.g; two phase commit, 2PC) to keep the system consistent. The locking mechanism, however, potentially results in various deadlocks. In service oriented architecture, the deadlock problem becomes even worse because multiple transactions try to lock shared resources in the unexpectable way due to the more randomicity of transaction requests, which has not been solved by existing research results. In this paper, we investigate how to prevent local deadlocks, caused by the resource competition among multiple sub-transactions of a gl obal transaction, and global deadlocks from the competition among different global transactions. We propose a replication based approach to avoid the local deadlocks, and a timestamp based approach to significantly mitigate the global deadlocks. A general algorithm is designed for both local and global deadlock prevention. The experimental results demonstrate the effectiveness and efficiency of our deadlock prevention approach. Further, it is also proved that our approach provides higher system performance than traditional resource allocation schemes.

This is the required answer.

4 0
3 years ago
What Active Directory object enables an administrator to configure password settings for users or groups that are different from
e-lub [12.9K]

Answer:

Password Settings object

Explanation:

Active Directory is made up of different services that are aimed at handling the access and permissions to resources over a network. It was developed by Microsoft and was originally used for centralized domain management but has evolved past that now.

In AD, the data stored are also known as Objects, these objects can be

  1. users or a group that has been given passwords and/or
  2. resources such as computers or printers.
  3. Organizational Units (OUs)

The object responsible for handling the configuration of passwords configuration is the Password Settings object.

Here, all settings relating to password setup, configuration, reset and so on takes place here. The settings can be applied to groups or users which can show the complexity, length, history of the password and so on.

8 0
3 years ago
6.23 LAB: Convert to binary - functions Instructor note: This is a lab from a previous chapter that now requires the use of a fu
Kitty [74]

Answer:

The program in Python is as follows:

import math

def integer_to_reverse_binary(integer_value):

   remainder = ""

   while integer_value>=1:

       remainder+=str(integer_value % 2)

       integer_value=math.floor(integer_value/2)

   reverse_string(remainder)

def reverse_string(input_string):

   binaryOutput=""

   for i in range(len(input_string)-1,-1,-1):

       binaryOutput = binaryOutput + input_string[i]

   print(binaryOutput)

integer_value = int(input("Enter a Number : "))

integer_to_reverse_binary(integer_value)

Explanation:

This imports the math module

import math

This defines the integer_to_reverse_binary function

def integer_to_reverse_binary(integer_value):

This initializes the remainder to an empty string

   remainder = ""

This loop is repeated while the integer input is greater than or equal to 1

   while integer_value>=1:

This calculates the remainder after the integer value is divided by 2

       remainder+=str(integer_value % 2)

This gets the floor division of the integer input by 2

       integer_value=math.floor(integer_value/2)

This passes the remainder to the reverse_string function

   reverse_string(remainder)

The reverse_string function begins here

def reverse_string(input_string):

This initializes the binaryOutput to an empty string

   binaryOutput=""

This iterates through the input string i.e. the string of the remainders

   for i in range(len(input_string)-1,-1,-1):

This reverses the input string

       binaryOutput = binaryOutput + input_string[i]

This prints the binary output

   print(binaryOutput)

<u>The main begins here</u>

This gets input for integer_value

integer_value = int(input("Enter a Number : "))

This passes the integer value to the integer_to_reverse_binary function

integer_to_reverse_binary(integer_value)

3 0
2 years ago
A company is executing a strategy to encrypt and sign all proprietary data in transit. The company recently deployed PKI service
Softa [21]

Answer:

A. S/MIME

B. TLS

C. Kerberos

Explanation:

PKI : Public Key Infrastructure is a technique which will allow services or applications to communicate securely across the unsecured network or internet.

PKI mainly consist of CA or Certificate Authority who can issue digital certificates or they are also known as trusted CA.  exmaples are godaddy, digicert, verizone, symmantec, etc.. and RA also known as Registration Authorities and they verify if the requested certificates can be stored at CA. Keys will be stored in the central directory.It will also consists of certificate management system and the policies governing PKI.

S/MIME : Secure/Multipurpose Internet Mail Extensions which use assymentric cryptography and sign the MIME data.   S/MIME will provide services like  Authentication, Encryption , Integrity, Privacy and Non repudiation for messaging applications

SMIME uses certificates which can be self signed or CA certified. It specifies MIME type as  application/pkcs7-mime  while transmitting the data.

TLS : Transport Layer Security. the earlier versions used to be known as SSL ( Secure Socket Layer) SSLv3 got depreciated and TLSv1.2/1.3 are popularly used to provide encryption, authentication, Integrity and Hashing for client to server side communication.

Most of the applications communicate securely using TLS.  They will establish secure TCP connection using SSL Handshake. During the Handshake they will exchange supported versions, ciphersuites and certificates. Applications which uses TLS always uses CA certificates and Inhouse applications can communicate using self signed certificate or even with CA certificates.

HTTPS which is also known as HTTP over SSL is widely used for almost all the web services to communicate securely across the internet.

Kerberos : It is a protocol used to prove the identity for two nodes which are communicating with each other. Kerberos uses both symmetric key cryptography and assymetric key cryptography. However, symmetric key cryptography is used widely and public key cryptography is used optionally.

Authentication server which is also known as AS is used to authenticate the requesting client.  It further forwards the user credentials to key distribution center. KDC further issues to TGT ( ticket granting ticket) and it uses TGS's secret key to encrypt. User will receive a encrypted output.  

When a User Login then The client authenticates itself to the Authentication Server (AS) which forwards the username to a key distribution center (KDC). The KDC issues a ticket-granting ticket (TGT), which is time stamped and encrypts it using the ticket-granting service's (TGS) secret key and returns the encrypted result to the user's workstation. Sessions will be renewed and managed by users session manager.

4 0
2 years ago
Other questions:
  • List of most popular entertainment and culture websites
    15·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • In order to do a binary search on an array Group of answer choices you must first do a sequential search to be sure the element
    5·1 answer
  • A standard for compressing music into computer files that can be easily exchanged on the Internet is called a(n) ______. A. musi
    5·1 answer
  • Which type of loan is based on financial need
    6·1 answer
  • If the starting address location changes, in which of the following cases, the program has to be recompiled? Select one: a. Both
    12·1 answer
  • Please answer quickly :S
    7·2 answers
  • A machine that converts energy to useful work.
    9·2 answers
  • A data analyst adds descriptive headers to columns of data in a spreadsheet. How does this improve the spreadsheet?.
    8·1 answer
  • What changes could you make so that a message, "User input deemed invalid." during designing a simple calculator program for you
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!