Skip to content

valdezhq/java-currency-converter

Repository files navigation

Java Currency Converter Challenge

Implement a currency conversion application by querying real-time exchange rates.

Description

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.

Guidelines

  • 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;

Concepts Covered

  • 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 Scanner class for user interaction.

How to Run

  1. Clone the repository;
  2. Set up dependencies (Gson library);
  3. Create a config.properties file in the root directory with your key rate.apiKey=YOUR_API_KEY_HERE;
  4. Compile and run the Main class;

About

A terminal based Currency Converter challenge in Java as part of the ONE Back-End Specialization Program.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages