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
-BARSIC- [3]
2 years ago
10

Java

Computers and Technology
1 answer:
shutvik [7]2 years ago
3 0

Answer:

import java.util.Scanner;

//The Temperature Class Begins Here

public class Temperature {

   private double ftemp;

//The constructor

   public Temperature(double ftemp) {

       this.ftemp = ftemp;

   }

//Get farenheit Method

   public double getFtemp() {

       return ftemp;

   }

//Set farenheit method

   public void setFtemp(double ftemp) {

       this.ftemp = ftemp;

   }

// Get Celcius Method

   public double getCelcius(double ftemp){

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

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

       return celcius;

   }

// Get Kelvin Method

   public double getKelving(double ftemp){

       double Kelvin;

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

       return Kelvin;

   }

}

//The Temperature Class Ends Here

//The Temperature Test Class with a main method begins Here

class TemperatureTest{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

//Prompt User for value in fahrenheit

       System.out.println("Enter·a·Fahrenheit·temperature:");

       double ftem = in.nextDouble();

       //Making the instance of the Temperature class

       Temperature temp = new Temperature(ftem);

       //Outputing Results

       System.out.println("The·temperature·in·Fahrenheit·i: "+ftem);

       System.out.println("The·temperature·in·Celcius·is: "+ temp.getCelcius(ftem));

       System.out.println("The·temperature·in·Kelvin·is: " + temp.getKelving(ftem));

   }

}

Explanation:

This is implemented in Java programming Language

Explanations are provided as comments within the code

You might be interested in
________ returns the last character in a StringBuilder variable named strBuf? Select one: A. strBuf.charAt(strBuf.length() - 1)
Lunna [17]

Answer:

A

Explanation:

strBuf.charAt(strBuf.length() - 1)

4 0
3 years ago
A game’s ______ is what contains its directions and calculations; some refer to it as the “engine” that drives the game.
Jobisdone [24]
Possibly the programming language.
4 0
2 years ago
In addition to explaining the paper’s topic, a thesis statement provides instructions on how to read the paper. explains why the
tamaranim1 [39]

Answer: I believe it’s explains why the paper was written!

Explanation:

Took edge 2021

8 0
3 years ago
Read 2 more answers
In Microsoft word you can access the blank command from the mini toolbar
Softa [21]
Your answer would be:
<span>
In Microsoft Word you can access the </span><span>insert citation command from the mini toolbar.</span>
3 0
3 years ago
Where is the risk of someone intercepting another person’s online activity the greatest?
sergey [27]

social networking site

3 0
3 years ago
Other questions:
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    11·2 answers
  • List two ways that guest could be defined
    12·2 answers
  • You often insert your company's logo into documents you create. One way to make it easier for you to quickly insert it is to sav
    10·1 answer
  • What is the rationale behind the development of an operating system in computing?
    15·1 answer
  • You recently discovered that Marketing1 can connect to Admin1, and Admin1 can connect to Marketing1, but neither of these comput
    11·1 answer
  • How to cancel branly subscription??​
    8·1 answer
  • What PowerShell command can be used to clean up old update files on a WSUS server, including unused update files, old revisions,
    10·1 answer
  • Your source data is of 50 GB. You make a full backup. Next week, once again you perform a full backup, but this time 10 more GB
    10·1 answer
  • The owner of a candle shop has asked for your help. The shop sells three types of candles as shown below:
    14·1 answer
  • NAT addresses concerns over the dwindling IPv4 address space by ___________________. 1 point allowing networks to use fewer IP a
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!