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
What's sprite and a costume?
astra-53 [7]

Answer:

Costumes are the artwork associated with a sprite. Sprites are things that move, so they can have multiple costumes. Backdrops are the artwork for the stage. The stage doesn't move, but can have multiple backdrops.

Sprites are used to make complex and interesting animations and games. A sprite is able to store images or animations with a set of properties such as position and visibility. Sprites also have properties to report interactions with other sprites or the mouse.

3 0
3 years ago
What does it mean to connect a circuit in parallel versus series?
Ira Lisetskai [31]

Below picture is the easiest explanation.

Resistors R1 and R2 are connected in series, whereas R3 and R4 are in parallel.

For the current it means that the current through R1 and R2 is always equal, which is not the case for R3 and R4, there the current splits depending on the R value.

For the voltage it means that the voltage over R3 and R4 is always the same, regardless of the R value.

8 0
3 years ago
How will you find and replace particular text in a document​
blsea [12.9K]

Answer:

Find and replace text

Go to Home > Replace or press Ctrl+H.

Enter the word or phrase you want to locate in the Find box.

Enter your new text in the Replace box.

Select Find Next until you come to the word you want to update.

Choose Replace. To update all instances at once, choose Replace All.

Explanation:

6 0
3 years ago
The C++ standard library provides code that’s organized into a. folders b. namespaces c. sublibraries d. none of the above
kolbaska11 [484]

Answer:

Namespaces ( B )

Explanation:

The codes in the C++ standard library are organized into folders Known as  namespaces .

namespaces are general used to organize various codes into logical groups to avoid name collisions that may occur when there is the presence of multiple libraries in a code base.

8 0
3 years ago
Red is the longest color of the visible spectrum <br> T or F
MAVERICK [17]
True! the farthest it can go is infared which we cannot see.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Which disk drive type contains a magnetic HDD with onboard flash memory serving as a non-volatile cache?
    6·1 answer
  • 15. What type of presentation includes information created in a different Office application?
    7·1 answer
  • You've applied a filter. What's the best way to see the original data?
    11·2 answers
  • I need help with this problem please
    9·1 answer
  • Thomas drew a rectangle with an area of 6 square cm what is the greatest possible perimeter of this rectangle
    5·1 answer
  • What is the age group for the silent genration
    10·1 answer
  • PLEASE HURRY!!!!
    8·2 answers
  • Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i
    12·1 answer
  • Imagine that your parents were starting a small business, and they wanted to upgrade their data storage. Would you recommend a f
    11·1 answer
  • Write a function called mul_time that takes a Time_Elapsed object and a number and returns a new Time_Elapsed object that contai
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!