Fahrenheit - return celsius; } public void print() {

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Lab - public class Fahrenheit { private double fahrenheit; private double celsius; public void setFahrenheit(double fahren) { fahrenheit = fahren; } public double getCelsius() { //double celsius = 0.0; celsius = (fahrenheit-32)/1.8;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return celsius; } public void print() { System.out.printf(fahrenheit + " degrees Fahrenheit == " + "%.2f degrees Celsius",celsius); System.out.println(); System.out.println(); //System.out.println(getCelsius()); } }...
View Full Document

Ask a homework question - tutors are online