It is intended to challenge us to make requests to an exchange rate API, manipulate JSON data, and finally filter and display the currencies of interest.
- Java JDK: version 11 onwards
- Gson Library 2.10.1 onwards
- Exchange rate API for conversion
- In
src/main/resources
, create aconfig.properties
file where you will place your API key, based on the template found in the same folder.# API configuration api.key=YOUR_API_KEY_HERE # Other settings can be added below # example.config=example_value
config.properties
is already marked on.gitignore
:) - In
- MVC pattern
│── src/
│ └── main/
│ │ └── java/
│ │ ├── Controller/
│ │ │ └── API.java
│ │ ├── Model/
│ │ │ └── Currency.java
│ │ └── View/
│ │ ├── Main.java
│ │ └── Menu.java
│ └── resources/
│ │ ├── config.properties
│ │ └── config.properties.template
- Run
Main.java
insrc/main/java/View
and choose your source and target currencies! - To add more currencies, simply add more Currency objects to the ArrayList.
- WARNING: The currencies added to this ArrayList must be present in the ExchangeRate-API supported currencies list: https://www.exchangerate-api.com/docs/supported-currencies
- The
code
(Currency Code) must match the one mentioned in the documentation.name
can be chosen at your discretion.
This training is part of the ONE Program, an alliance between Alura Latam and Oracle