

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Temperature Conversion INF 231 Programming Concepts Introd uction This user guide explains how the java program referenced can be used to convert Fahrenheit to Celsius with a few simple steps. When the user accesses the program, they can enter their Fahrenheit temperature into the program, and will be given the Celsius equivalent. The program will then give them the option to continue with more temperatures or end their session. This user guide will explain how the program works. Program Snapshot Progra m Code
import java.util.Scanner; public class FinalTemp { private static final String FinalTemp = null; public static void main (String [] argus) { { String cont = ""; do { double celsius, fahrenheit; //create Scanner and request fahrenheit temp from user Scanner s = new Scanner(System.in); System.out.println("what is the temp in Fahrenheit?"); //verify user enters a valid F temp while (!s.hasNextDouble()) { s.next(); System.out.println("Please enter valid temperature"); } fahrenheit = s.nextDouble(); celsius = (fahrenheit - 32) * 5.0 / 9.0; String strCelsius = String.format("%.2f", celsius); System.out.println("Temp in Celsius is: " + strCelsius); System.out.println("Continue? (Y/N)"); cont = s.next(); } while(cont.equalsIgnoreCase("Y")); Kerry Trafton"); System.out.println("Hello Instructor Fekete, This is the INF231 Final Assignment for: