answer.
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
Verdich [7]
2 years ago
6

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

e in Fahrenheit, Celsius, and Kelvin. The class should have the following field: ftemp. A double that holds a Fahrenheit temperature. The class should have the following methods: Constructor. The constructor accepts a Fahrenheit temperature (as a double) and stores it in the ftemp field. setFahrenheit. The setFahrenheit method accepts a Fahrenheit temperature (as a double) and stores it in the ftemp field. getFahrenheit. Returns the value of the ftemp field, as a Fahrenheit temperature (no conversion required). getCelsius. Returns the value of the ftemp field converted to Celsius. getKelvin. Returns the value of the ftemp field converted to Kelvin.
Computers and Technology
1 answer:
posledela2 years ago
8 0

Answer:

Explanation:

   public class Temperature

   {

       double ftemp;

       public int Constructor(double fahrenheit)

       {

           ftemp = fahrenheit;

          return Convert.ToInt32(ftemp);

       }

       public void setFahrenheit(double fahrenheit)

       {

           ftemp = fahrenheit;

       }

       public void getFahrenheit()

       {

           ftemp = Constructor(ftemp);

       }

       public void getCelcius()

       {

           ftemp = (ftemp - 32) * 5 / 9;

       }

       public void getKelvin()

       {

           ftemp = (ftemp - 32) * 5 / 9 + 273.15;

       }

   }

You might be interested in
A bicycle sharing company is developing a multi-tier architecture to track the location of its bicycles during peak operating ho
fgiga [73]

Answer:

d use Amazon API Gateway with Amazon kinesis...

5 0
1 year ago
In the simulation, player 2 will always play according to the same strategy. The number of coins player 2 spends is based on wha
baherus [9]

The simulation, player 2 will always play according to the same strategy.

Method getPlayer2Move below is completed by assigning the correct value to result to be returned.

Explanation:

  • You will write method getPlayer2Move, which returns the number of coins that player 2 will spend in a given round of the game. In the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on.

#include <bits/stdc++.h>  

using namespace std;

bool getplayer2move(int x, int y, int n)  

{

   int dp[n + 1];  

   dp[0] = false;  

   dp[1] = true;  

   for (int i = 2; i <= n; i++) {  

       if (i - 1 >= 0 and !dp[i - 1])  

           dp[i] = true;  

       else if (i - x >= 0 and !dp[i - x])  

           dp[i] = true;  

       else if (i - y >= 0 and !dp[i - y])  

           dp[i] = true;  

       else

           dp[i] = false;  

   }  

   return dp[n];  

}  

int main()  

{  

   int x = 3, y = 4, n = 5;  

   if (findWinner(x, y, n))  

       cout << 'A';  

   else

       cout << 'B';  

   return 0;  

}

8 0
1 year ago
Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
hodyreva [135]
Please provide complete details.
4 0
1 year ago
Which of the following is not true of how computers represent complex information
mote1985 [20]

Answer: c. Depending on context the same sequence of bits may represent different types of information.

Explanation:

The options for the question are:

A. Computing devices use patterns of bits to represent complex information

B. Abstraction helps represent complex information by surfacing complexity that might otherwise be hidden

C. Depending on context the same sequence of bits may represent different types of information

D. Common abstractions that are represented by computing devices include numbers, characters, and color.

The following are true of how computers represent complex information:

• Computing devices use patterns of bits to represent complex information

• helps represent complex information by surfacing complexity that might otherwise be hidden

• Common abstractions that are represented by computing devices include numbers, characters, and color.

Therefore, the option that is not true of how computers represent complex information is that "depending on context the same sequence of bits may represent different types of information".

5 0
1 year ago
Read 2 more answers
Compare the encryption algorithms found in s-tools: idea, mdc, des, and 3des.
grin007 [14]
Are their answer chocies 

3 0
2 years ago
Other questions:
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • When performing actions between your computer and one that is infected with a virus which of the following offers no risk becomi
    5·1 answer
  • The process of converting information, such as text, numbers, photos, or music, into digital data that can be manipulated by ele
    7·1 answer
  • You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
    11·1 answer
  • Refer to the exhibit. Which two network addresses can be assigned to the network containing 10 hosts? Your answers should waste
    7·1 answer
  • Write a program to determine all pairs of positive integers, (a, b), such that a &lt; b &lt; 1000 and [a2 + b2 + 1)/(ab) is an i
    13·1 answer
  • You are consulting for a trucking company that does a large amount ofbusiness shipping packages between New York and Boston. The
    5·1 answer
  • Represent the logic of a program that allows the user to enter a value for one edge of a cube. The program calculates the surfac
    10·1 answer
  • (Displaying a Sentence with Its Words Reversed) Write an application that inputs a line of text, tokenizes the line with String
    6·1 answer
  • Checkpoint 10.43 Write an interface named Nameable that specifies the following methods: _______{ public void setName(String n)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!