Skip to content

A simple currency converter built in Java using the java.net.http package and the ExchangeRate API.

License

Notifications You must be signed in to change notification settings

wesley-archives/exchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Converter

A simple currency converter built in Java using the java.net.http package and the ExchangeRate API. This project was created as a learning tool to practice making HTTP requests, handling JSON responses, and building a basic console app in Java.

Table of Contents


Features

  • Real-time currency conversion using ExchangeRate API
  • Simple and interactive terminal menu
  • Clean and modular Java code (MVC pattern)
  • HTTP client with java.net.http.HttpClient
  • JSON parsing with Gson
  • Supports custom API base URL and key via config

Get Started

Prerequisites

  • Java 17+
  • Maven

Running the project

  1. Clone the repository
git clone https://github.com/wesleybertipaglia/currency-converter.git
  1. Navigate to the project directory
cd currency-converter
  1. Create a app.properties file following the app.properties.example file

  2. Build the project

mvn clean install
  1. Run the app
mvn exec:java -Dexec.mainClass="com.wesleybertipaglia.Main"

Usage Example

-------------------------------------

💱 CURRENCY CONVERSION MENU

-------------------------------------

1. Convert currency
0. Exit

Choose an option: 1

Enter source currency (e.g., USD): USD
Enter target currency (e.g., EUR): BRL
Enter amount: 100

✅ 100.00 USD = 505.76 BRL

Contributing

Contributions are welcome! If you have any suggestions or improvements, please open an issue or a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A simple currency converter built in Java using the java.net.http package and the ExchangeRate API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages