public class CToF {
private double degrees;
public double getDegrees() {
return degrees;
}
public void setDegrees(double degrees) {
this.degrees = degrees;
}
public CToF(double degrees){
this.degrees = degrees;
}
public double getFahrenheit(){
return 9.0/5.0 * degrees + 32;
}
}
public class FToC {
private double degrees;
public double getDegrees() {
return degrees;
}
public void setDegrees(double degrees) {
this.degrees = degrees;
}
public FToC(double degrees){
this.degrees = degrees;
}
public double getCelsius(){
return 5.0/9.0 * (degrees - 32);
}
}
Nice post. A valuable information here.Thanks for sharing with us
ReplyDeleteWeb Development Company in Pune
E-Commerce Website Development
Mobile App Development