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
Annette [7]
4 years ago
5

Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur

e in Fahrenheit, Celsius, and Kelvin. The Temperature class should have the following instance variable: ftemp – A double that holds a Fahrenheit temperature. The Temperature class should have the following methods: ReadInput – Uses a Scanner method to populate ftemp with double value. getFahrenheit – Returns the value of the ftemp field, as a Fahrenheit temperature. getCelsius – Returns the value of the ftemp field converted to Celsius. getKelvin – Returns the value of the ftemp field converted to Kelvin. DisplayOutput – The Fahrenheit temperature and the equivalent values in Celsius and Kelvin are gotten and displayed, one per line, and each along with an appropriate message.
Computers and Technology
1 answer:
natita [175]4 years ago
8 0

Answer:

See explaination

Explanation:

import java.util.Scanner;

public class TemperatureTest {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.print("Enter Fahrenheit temperature: ");

double ftemp = sc.nextDouble();

Temperature temp = new Temperature(ftemp);

System.out.println("The temperature in Fahrenheit is " + temp.getFahrenheit());

System.out.println("The temperature in Celsius is " + temp.getCelsius());

System.out.println("The temperature in Kelvin is " + temp.getKelvin());

}

}

class Temperature {

double ftemp;

Temperature(double ftemp) {

this.ftemp = ftemp;

}

double getFahrenheit(){

return ftemp;

}

double getCelsius(){

return ((double)5/9*(ftemp-32));

}

double getKelvin(){

return (((double)5/9*(ftemp-32))+273);

}

}

Output:

$ java TemperatureTest

Enter Fahrenheit temperature: -40

The temperature in Fahrenheit is -40.0

The temperature in Celsius is -40.0

The temperature in Kelvin is 233.0

You might be interested in
If the firewall is configured for credential phishing prevention using the "Domain Credential Filter" method, which login will b
ahrayia [7]

Mapping to the IP address of the logged-in user<u>-will detect  a credential theft</u>

<u></u>

Explanation:

In the "Domain Credential Filter" method the firewall matches the username and the password submitted by the user with the corporate user id and password.

In order to match the credentials submitted by the user the firewalls retrieves data from the bloom filter which is further connected  to windows  User-ID credential service add-on.

The firewall also looks in its Mapping Table for the IP address of the logged-in user

3 0
3 years ago
A hard drive that is running slowly may not have been a0properly.
kipiarov [429]
Its outdated maybe because of time issues or over-usage<span />
6 0
3 years ago
Read 2 more answers
over time, you have noticed unauthorized configuration changes made to virtual machine cloud settings. you need a way to track w
Nuetrik [128]

One way to track who made these changes to the virtual machine cloud settings and when is to: D. enable cloud resource activity auditing.

<h3>What is a cloud?</h3>

In Computer technology, a cloud can be defined as the elastic leasing of pooled computer resources such as physical hardware through virtualization and over the Internet, so as to enable the storage and sharing of files and documents virtually and in real-time.

In this scenario, we can reasonably infer and logically conclude that one way to track who made these changes to the virtual machine cloud settings and when is to enable cloud resource activity auditing because it would provide a log of actions such as information about the engineer who made configuration changes.

Read more on a virtual machine here: brainly.com/question/12060797

#SPJ1

Complete Question:

Over time, you have noticed unauthorized configuration changes made to virtual machine cloud settings. You need a way to track who made these changes and when. What should you do?

A. Enable virtual machine API integration.

B. Rotate the cloud access keys.

C. Deploy an OSI layer 7 firewall.

D. Enable cloud resource activity auditing.

7 0
1 year ago
Universal Containers uses an Auto-numbering system to uniquely identify each support request. They want customers to know this n
Nookie1986 [14]

Answer:

Following are the answers.

  • Auto-response Rules
  • Case Comment Notifications

Explanation:

They use the following system to determine that requirement for help in such a special manner. They need folks to identify the amount at the earliest opportunity. So, these Auto-response Rules and Case Comment Notifications are the functionalities that the System Admin implements to provide customers to easily obtain certain data are as follows.

8 0
3 years ago
A new version of an existing software program is considered a ________technology
inn [45]
Emerging and sustaining.
8 0
4 years ago
Other questions:
  • Consider a set of mobile computing clients in a certain town who each
    13·1 answer
  • Why do amusement parks continue to build new roller coasters?
    6·2 answers
  • Which attribute of the image tag specifies the URL of an image
    14·1 answer
  • Today when Dylan turned on his computer, he noticed that the monitor was very dim. He could still see the desktop icon and text.
    15·1 answer
  • Which of the following terms best describes the product development life cycle process?
    6·2 answers
  • Select all the items of the Design Elements.
    7·1 answer
  • User name ideas for ro blox? I'm changing mine and I dont know what I want. No numbers or underscores!
    10·2 answers
  • List down any 5 Advantages and any 5 Disadvantages of Computers
    7·2 answers
  • Which university first developed the use of email?
    14·1 answer
  • If an if-else statement is true, it will include which kinds of results?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!