Implement a currency conversion application by querying real-time exchange rates.
This project is an interactive currency converter that utilizes the ExchangeRate API to obtain up-to-date quotes. The application allows conversions between the Brazilian Real (BRL) and currencies such as the Chinese Yuan (CNY), South Korean Won (KRW), and Cuban Peso (CUP), as well as their reverse operations. The program runs via terminal, offering a dynamic menu and exception handling to ensure stability during use.
- The menu must display at least 6 different currency conversion options;
- Use the ExchangeRate API to ensure accurate and real-time data;
- Use the Gson library for deserialization of the JSON data received from the API;
- Implement a console-based interface for user interaction using the Scanner class;
- Display the converted values based on the amount entered by the user and the current exchange rate;
- REST API Consumption with HTTP GET requests;
- JSON Manipulation through the Gson library to turn raw data into Java Objects (Records/DTOs);
- Using property files (.properties) to protect sensitive credentials;
- Implementing try-catch blocks to manage network issues and invalid user inputs;
- Using the
Scannerclass for user interaction.
- Clone the repository;
- Set up dependencies (Gson library);
- Create a
config.propertiesfile in the root directory with your keyrate.apiKey=YOUR_API_KEY_HERE; - Compile and run the
Mainclass;