I want the program how to do
Answers
here is the program..
********************************************************************
import java.util.*;
public class Fahrenheit
{
static double max,min,f1,f2;
Fahrenheit(double ma,double mi,double fa1,double fa2)
{
max=ma;
min=mi;
f1=fa1;
f2=fa2;
}
public void accept()
{
Scanner in = new Scanner(System.in);
System.out.println("Enter the maximum and minimum temperature in celsius:");
max=in.nextDouble();
min=in.nextDouble();
}
public void convert()
{
f1=((9*max)/5.0)+32;
f2=((9*min)/5.0)+32;
}
public static void main(String args[])
{
Fahrenheit ob = new Fahrenheit(0.0,0.0,0.0,0.0);
ob.accept();
ob.convert();
System.out.println("Max temp. in fahrenheit: "+f1+"\nMin temp. in fahreheit: "+f2);
}
}
***************************************************************************
Hope it helps you...
please mark it as brainliest...