0% found this document useful (0 votes)
46 views10 pages

Time Variance Authority

Uploaded by

ariaschanztromm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views10 pages

Time Variance Authority

Uploaded by

ariaschanztromm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Temperature

Converter
TIME VARIANCE AUTHORITY
VAN EMREY ALCANTARA
GILL ROBERT ROMEN
CHRISTINE MIA PAZ
Documentation
• Definition/Background of the system:
The temperature converter system is a computer program designed to convert
temperatures between Fahrenheit and Celsius scales. It allows users to input a
temperature value in either Fahrenheit or Celsius and provides the corresponding
conversion in the other unit of measurement. The system utilizes mathematical
formulas to perform the temperature conversions accurately.
Documentation
• Significance of the system:
The temperature converter system holds significant importance as it provides a
convenient and efficient way to convert temperatures between Fahrenheit and
Celsius scales. It eliminates the need for manual calculations and reduces the
chances of errors that may occur during conversions. The system is particularly
useful in various fields such as meteorology, scientific research, engineering, and
everyday life, where temperature conversions are frequently required.
Documentation
By simplifying the process of temperature conversion, the system saves time and
effort for users. It promotes accuracy and consistency in temperature
measurements, ensuring reliable data interpretation. The significance of the
system lies in its ability to enhance productivity, improve data analysis, and
facilitate seamless communication across different temperature scales.
Flowchart
Code:
import java.util.Scanner;

public class TemperatureConverter {


public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

System.out.println("Temperature Converter");
System.out.println("1. Celsius to Fahrenheit");
System.out.println("2. Fahrenheit to Celsius");
System.out.print("Conversion type (1 or 2): ");

int choice = scanner.nextInt();


Code:
switch (choice) {
case 1:
System.out.print("Enter temperature in Celsius: ");
double celsius = scanner.nextDouble();
double fahrenheit = celsiusToFahrenheit(celsius);
System.out.println("Result: " + fahrenheit + " Fahrenheit");
break;

case 2:
System.out.print("Enter temperature in Fahrenheit: ");
double fahrenheitInput = scanner.nextDouble();
double celsiusOutput = fahrenheitToCelsius(fahrenheitInput);
System.out.println("Result: " + celsiusOutput + " Celsius");
break;
Code:
default:
System.out.println("Invalid choice. Please choose 1 or 2.");
}

scanner.close();
}

private static double celsiusToFahrenheit(double celsius) {


return (celsius * 9 / 5) + 32;
}

private static double fahrenheitToCelsius(double fahrenheit) {


return (fahrenheit - 32) * 5 / 9;
}
}
Question and Answer Corner

You might also like