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
Read the citation example, and then use the drop-down menus to identify each part.
Lemur [1.5K]

Answer:

im notur e

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print o
bearhunter [10]

A program that repeatedly prompts a user for integer numbers :

biggest = none

smallest = none

while True:

input = raw_input(“Enter a number:”)

if(input == “done” break

try:

 number = float(inp)

 except ValueError:

 print “Please enter only numbers”

else

 if smallest is None:

  smallest = number;

  biggest = number;

elif number < smallest:

 smallest = number

elif num > largest:

 largest = number

Print “Greatest is “, biggest

Print “Smallest is”, smallest

In this program an input is obtained, if it is equal to the word “done”, then the program stops b printing greatest and smallest number in the given input.

If invalid inputs are given then user is prompted to enter valid number. Otherwise the value of smallest and greatest are calculated according to the input using if-else construct.

6 0
3 years ago
One of the major disadvantages of application service providers (ASPs) is that they:
AVprozaik [17]

Answer:

do not guarantee that applications will fully meet an organization's needs.

Explanation:

An application service provider is a third-party group established to deliver commercial software applications and additional services related to such software and do so online and sometimes their services do not guarantee that their applications will fully meet an organization’s needs.

8 0
3 years ago
is there an app i can use to make a picture appear in the corner of a video then disappear after being up for a second?
Nuetrik [128]
Umm i really do not know i'm sorry
7 0
3 years ago
Read 2 more answers
To control how and when the slides should appear during the slide show, we use the__________________ feature​
jekas [21]

Answer:

Slide transition

Explanation:

See open chapter 4 page 49 and you will get it

8 0
3 years ago
Other questions:
  • 3k means about 3 thousand bytes. how would you express two hundred million bytes?
    8·1 answer
  • The _________ element enables developers to embed a self-contained web page within another html document.
    12·1 answer
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • Excel assigns the name ____ to the first excel table created in a workbook.
    10·1 answer
  • ____ languages create source code using words and structures similar to spoken language.​
    15·1 answer
  • What category of sensory receptors are sensitive to touch sound and motion?
    10·1 answer
  • Where are the worksheet tabs located
    7·1 answer
  • For this exercise, you'll use the Rectangle class below (you can assume that the length and width are measured in feet).
    12·1 answer
  • Which type of film would typically require the least amount of input from a screenwriter?
    10·1 answer
  • Which instruction is used to convert an integer value to float and push it onto the fpu stack?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!