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
alex41 [277]
3 years ago
15

Assume that two classes 'Temperature' and 'Sensor' have been defined. 'Temperature' has a constructor that accepts a double para

meter. 'Sensor' has a method named 'getReading' which returns the sensor's current reading (a double). Write a static method 'create' (that could be added to the 'Temperature' class) that accepts a 'Sensor' object. 'create' gets the value of the current reading of the 'Sensor' object, and returns a new 'Temperature' object that is based on this reading.
Computers and Technology
1 answer:
Black_prince [1.1K]3 years ago
7 0

Answer:

The answer for the following question is given as:

public static Temperature create(Sensor ob)

{

return new Temperature(ob.getReading());

}

Explanation:

In this we have create a static method of  Temperature class which accept a 'Sensor' object and  return the new 'Temperature' object that calls the 'getReading()' function This function returns the sensor's current reading.

You might be interested in
What is the energy conversion of solar water heaters?
Gelneren [198K]
A liquid-to-liquid heat exchanger uses a heat-transfer fluid that circulates through the solar collector, absorbs heat, and then flows through a heat exchanger to transfer its heat to water in a storage tank. Heat-transfer fluids, such as antifreeze, protect the solar collector from freezing in cold weather.
7 0
3 years ago
What did Adam and Eve look like?
Nata [24]
No one could possibly know, unfortunately.
6 0
3 years ago
Read 2 more answers
Choose all that apply.
stiks02 [169]

Answer:

choose all that apply

Explanation:

7 0
3 years ago
a.Write a Python function sum_1k(M) that returns the sum푠푠= ∑1푘푘푀푀푘푘=1b.Compute s for M = 3 by hand and write
stealth61 [152]

Answer:

def sum_1k(M):

   s = 0

   for k in range(1, M+1):

       s = s + 1.0/k

   return s

def test_sum_1k():

   expected_value = 1.0+1.0/2+1.0/3

   computed_value = sum_1k(3)

   if expected_value == computed_value:

       print("Test is successful")

   else:

       print("Test is NOT successful")

test_sum_1k()

Explanation:

It seems the hidden part is a summation (sigma) notation that goes from 1 to M with 1/k.

- Inside the <em>sum_1k(M)</em>, iterate from 1 to M and calculate-return the sum of the expression.

- Inside the <em>test_sum_1k(),</em> calculate the <em>expected_value,</em> refers to the value that is calculated by hand and <em>computed_value,</em> refers to the value that is the result of the <em>sum_1k(3). </em>Then, compare the values and print the appropriate message

- Call the <em>test_sum_1k()</em> to see the result

8 0
3 years ago
Miriam Is a network administrator. A few employees want to access sensitive Information stored on a backup device. She wants to
mihalych1998 [28]

Answer:

C. user accounts

Explanation:

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication and authorization is used in access control, to ensure a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification

Hence, an access control list primarily is composed of a set of permissions and operations associated with a NTFS file such as full control, read only, write, read and execute and modify.

Generally, access control list are defined for specific user accounts and may either be an administrator, standard user or guest account.

In this scenario, Miriam a network administrator wants to give access rights to employees who are interested in accessing sensitive Information stored on a backup device. Thus, the option Miriam should use is user account.

7 0
2 years ago
Other questions:
  • What can be determined from this selection? Check all that apply. The Tax Info worksheet is currently being viewed. There are th
    6·2 answers
  • Help me Please?!! I will put you as brainliest.<br>I hope I spelled that right.
    5·2 answers
  • What are the 4-bit patterns used to represent each of the characters in the string "1301"? Only represent the characters between
    14·1 answer
  • When configuring a vpn server to automatically assign ​ip addresses to remote clients, how many ip addresses are in a single poo
    10·1 answer
  • What is the role of the federal government in regulating the media and the internet?
    6·2 answers
  • Select the tips you should follow when writing a business report.
    12·1 answer
  • There are....... section in<br>cpu<br>​
    15·1 answer
  • How ssd is better than normal sata and pata HDD​
    11·1 answer
  • Every time a key is pressed on the keyboard, the _______________ chip in the keyboard notices which key has been pressed.
    13·1 answer
  • How are computers classified into different types? Explain ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!