https://github.com/nurulashraf/java-temperature-converter
A simple Java-based temperature converter that converts between Celsius, Fahrenheit, and Kelvin. Includes error handling and a user-friendly CLI interface.
https://github.com/nurulashraf/java-temperature-converter
cli-tool error-handling java java-basics java-programming temperature-converter unit-conversion utility
Last synced: 26 days ago
JSON representation
A simple Java-based temperature converter that converts between Celsius, Fahrenheit, and Kelvin. Includes error handling and a user-friendly CLI interface.
- Host: GitHub
- URL: https://github.com/nurulashraf/java-temperature-converter
- Owner: nurulashraf
- License: mit
- Created: 2025-01-30T04:52:44.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-03T07:29:40.000Z (3 months ago)
- Last Synced: 2025-02-06T14:38:27.747Z (3 months ago)
- Topics: cli-tool, error-handling, java, java-basics, java-programming, temperature-converter, unit-conversion, utility
- Language: Java
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Temperature Converter
A simple Java-based temperature converter that converts between Celsius, Fahrenheit, and Kelvin. The program includes error handling and a user-friendly command-line interface.
## Features
- Convert temperatures between Celsius, Fahrenheit, and Kelvin.
- Error handling for invalid inputs.
- Simple CLI-based interaction.
- Lightweight and easy to use.## Installation
1. Clone the repository:
```sh
git clone https://github.com/nurulashraf/java-temperature-converter.git
```
2. Navigate to the project directory:
```sh
cd java-temperature-converter
```
3. Compile the Java program:
```sh
javac -d bin src/temperature_converter/TemperatureConverter.java
```
4. Run the program:
```sh
java -cp bin temperatureconverter.TemperatureConverter
```## Usage
1. Enter a temperature value.
2. Select the input unit: (C)elsius, (F)ahrenheit, or (K)elvin.
3. Select the output unit: (C)elsius, (F)ahrenheit, or (K)elvin.
4. The program will display the converted temperature.## Example
```
Enter temperature value:
100
Select the input unit: (C)elsius, (F)ahrenheit, (K)elvin
C
Select the output unit: (C)elsius, (F)ahrenheit, (K)elvin
F
Converted temperature: 212.00 F
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.