abengl / Currency-Converter

Project is designed to simplify currency conversions by using an API to fetch the latest exchange rates.

Repository from Github https://github.comabengl/Currency-ConverterRepository from Github https://github.comabengl/Currency-Converter

Currency Converter

Table of Contents

About The Project

currency converter background
This project is designed to simplify currency conversions by using an API to fetch the latest exchange rates. With user-friendly input validation and an intuitive menu, the program ensures seamless currency conversion while maintaining code modularity and scalability.

Key Features:

  • Predefined and custom currency conversions.
  • Real-time exchange rate fetching using HTTP requests.
  • Input validation to ensure accurate and error-free user interaction.
  • Error handling for invalid inputs and API communication issues.

Built With

  • Java 17: Main programming language.
  • Gson: JSON parsing library for handling API responses.
  • HttpClient: Java's built-in library for making HTTP requests.

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

Ensure you have the following installed on your system:

  • Java Development Kit (JDK) 17 or higher
  • Maven for dependency management
  • Get a free API Key at ExchangeRate API

Installation

  1. Clone the repository:
    git clone https://github.com/your-repository/currency-converter.git
  2. Navigate to the project directory:
    cd currency-converter
  3. Install dependencies using Maven:
    mvn install
  4. Build the project:
    mvn package

Usage

  1. Run the program:
    java -jar target/currency-converter.jar
  2. Follow the on-screen menu to select your desired conversion option.
  3. Enter the required details (amount and currencies) as prompted.
  4. View the converted amount and repeat the process as needed.

Examples:

  • Option 1: Convert USD to PEN.

currency converter option

- Option 6: Enter custom currency codes, e.g., PEN to KRW.

currency converter custom

- Errors: When an invalid input is entered an error will appear and the user will be prompted to start the process again.

currency converter error

About

Project is designed to simplify currency conversions by using an API to fetch the latest exchange rates.


Languages

Language:Java 100.0%