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

Java

Computers and Technology
1 answer:
shutvik [7]3 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
It’s just a multiple choice question about emails
cestrela7 [59]
The Answer is : A, B , C .
7 0
3 years ago
Read 2 more answers
Compare and contrast the features of the four computer career fields. Write a paragraph on each and specify how the four career
tresset_1 [31]

Answer:

don`t know

Explanation: help me

7 0
4 years ago
Which of the following application delivery methods requires Internet access?
morpeh [17]

Answer:Cloud hosted

Explanation:

3 0
3 years ago
What are 3 ways to get friends to stop texting and driving?
Leni [432]
Not allow them to use their phone, tell them you won’t get in the car with them unless they stop texting and driving, inform their parents
3 0
3 years ago
Read 2 more answers
I need to get 20 websites about Artificial Intelligence (not Wikipedia) for 20 annotated bibliographies.
adell [148]

Answer:

https://books.google.com/books?id=H39dDwAAQBAJ&pg=PA452&lpg=PA452&dq=20+websites+for+Artificial+Intelligence+for+annotated+bibliographies.&source=bl&ots=Pe9AafWxCM&sig=ACfU3U3B_5nwtNBg8l92tgZekJVmdvbYCA&hl=en&ppis=_e&sa=X&ved=2ahUKEwjW49PYgvznAhUMZd8KHZQHBZIQ6AEwAHoECAsQAQ#v=onepage&q=20%20websites%20for%20Artificial%20Intelligence%20for%20annotated%20bibliographies.&f=false

Explanation:

4 0
4 years ago
Other questions:
  • Which tool will be useful in darkening a subject’s hair color in a photograph? A.Dodge tool B.Burn tool C.Patch tool D.Blur tool
    5·2 answers
  • You have just plugged a USB portable hard drive into an older laptop and the disk has not appeared as available. You are concern
    11·1 answer
  • does someone know of a website where I can find free essays or assignments already answered (right or wrong, ain't matter), kind
    15·1 answer
  • PLEASE HELP ASAP!!!!111 Read "Teenagers are rewriting the rules of the news" (find it somewhere and answer questions below)
    7·1 answer
  • A graphic design student is putting the finishing touches on her PowerPoint presentation for her speech. She is carefully analyz
    12·1 answer
  • Explain what a honeypot is. In your explanation, give at least one advantage and one disadvantage of deploying a honeypot on a c
    12·1 answer
  • Part 1: Plan and Write the Pseudocode
    7·1 answer
  • Globalization is based on <br>​
    10·1 answer
  • What is the address of the first SFR (I/O Register)​
    11·1 answer
  • If you schedule a message to be delivered at 6 p.m., but you log out of your computer at 5 p.m., what will happen to the message
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!