Professional Documents
Culture Documents
Java Programming
Java Programming
Micro-Project On
Currency Converter
Submitted To
MSBTE
Computer Engineering
Under I Scheme
Submitted By
1
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
CERTIFICATE
Seal Of
Institute
2
INDEX
1 Abstract 4
2 Introduction 5
3 Resources Required 6
5 Code 8
6 Output 11
7 Conclusion 12
8 Reference 13
3
Abstract:
Different countries use different currency, and there is daily variation in these currencies
relative to one another. Those who transfer money from one country to another (one currency
to another) must be updated with the latest currency exchange rates in the market.
Currency converter mini project is built keeping this thing in mind. It is simply a calculator
developed using Java. In this mini project, there is regular update about currency of every
country by which it displays present currency market value and conversion rate.
Such application can be used by any user, but it is mainly useful for business, shares, and
finance related areas where money transfer and currency exchange take place daily.
In this currency converter project, users are provided with an option to select the type of
conversion, i.e., from “this” currency to “that” currency. This simple feature allows users to
enter amount to be converted (say currency in Dollars) and display the converted amount (say
currency in Euro).
4
INTRODUCTION:
A currency converter is a calculator that converts the value or quantity of one currency into the
relative values or quantities of other currencies. For example, if I had 100 that needed to be
exchanged into the local currency of a country I am visiting, I would need to know the dollar-
rupee conversion, if I were traveling to certain parts of Europe, the rupee-pound conversion.
The currency converter application, called Currency Converter, converts amounts from one
currency to two others. You can choose to display three different currencies, euros, yen, or
dollars, and enter a value in one currency to be converted into the other selected currencies
Purpose:
The purpose of developing oh calculator in Java programming is that it helps the user to
convert the currency into various other foreign currency and help them to understand their balance in
various other country via there rates for them in one’s country
Scope:
The scope for this project is though it a mini project but considering the fast-growing
international buyers and sellers the small – small features like this (currency converter) can
come in handy. Also, the new and long-lasting trends such as bit coins are the major hope to
keep this project live for decades
Result:
The output for this mini project is:
1. The currency is selected from the list mentioned
2. Then the amount is entered
3. The conversion is done and the amount in shown in various foreign currency
5
RESOURCES REQUIRE:
6
APPLICATION OF CURRENCY CONVERTER:
7
CODE:
import java.util.*;
import java.text.DecimalFormat;
public class CurrencyConverter
{
public static void main(String[] args)
{
double amount;
double rupee, dollar, pound, euro, yen, ringgit;
int choice;
DecimalFormat f = new DecimalFormat("##.##");
Scanner sc = new Scanner(System.in);
System.out.println("Following are the Choices:");
System.out.println("Enter 1: Ruppe");
System.out.println("Enter 2: Dollar");
System.out.println("Enter 3: Pound");
System.out.println("Enter 4: Euro");
System.out.println("Enter 5: Yen");
System.out.println("Enter 5: Ringgit");
System.out.print("\nChoose from above options: ");
choice = sc.nextInt();
System.out.println("Enter the amount you want to convert?");
amount = sc.nextFloat();
switch (choice)
{
case 1: // Ruppe Conversion
dollar = amount / 70;
System.out.println(amount + " Rupee = " + f.format(dollar) + " Dollar");
pound = amount / 88;
System.out.println(amount + " Rupee = " + f.format(pound) + " Pound");
euro = amount / 80;
System.out.println(amount + " Rupee = " + f.format(euro) + " Euro");
yen = amount / 0.63;
System.out.println(amount + " Rupee = " + f.format(yen) + " Yen");
8
ringgit = amount / 16;
System.out.println(amount + " Rupee = " + f.format(ringgit) + " ringgit");
break;
case 2: // Dollar Conversion
rupee = amount * 70;
System.out.println(amount + " Dollar = " + f.format(rupee) + " Ruppes");
pound = amount *0.78;
System.out.println(amount + " Dollar = " + f.format(pound) + " Pound");
euro = amount *0.87;
System.out.println(amount + " Dollar = " + f.format(euro) + " Euro");
yen = amount *111.087;
System.out.println(amount + " Dollar = " + f.format(yen) + " Yen");
ringgit = amount *4.17;
System.out.println(amount + " Dollar = " + f.format(ringgit) + " ringgit");
break;
case 3: // Pound Conversion
rupee = amount * 88;
System.out.println(amount + " pound = " + f.format(rupee) + " Ruppes");
dollar = amount *1.26;
System.out.println(amount + " pound = " + f.format(dollar) + " Dollar");
euro = amount *1.10;
System.out.println(amount + " pound = " + f.format(euro) + " Euro");
yen = amount *140.93;
System.out.println(amount + " pound = " + f.format(yen) + " Yen");
ringgit = amount *5.29;
System.out.println(amount + " pound = " + f.format(ringgit) + " ringgit");
break;
case 4: // Euro Conversion
rupee = amount * 80;
System.out.println(amount + " euro = " + f.format(rupee) + " Ruppes");
dollar = amount *1.14;
System.out.println(amount + " euro = " + f.format(dollar) + " Dollar");
pound = amount *0.90;
System.out.println(amount + " euro = " + f.format(pound) + " Pound");
yen = amount *127.32;
System.out.println(amount + " euro = " + f.format(yen) + " Yen");
9
ringgit = amount *4.78;
System.out.println(amount + " euro = " + f.format(ringgit) + " ringgit");
break;
case 5: // Yen Conversion
rupee = amount *0.63;
System.out.println(amount + " yen = " + f.format(rupee) + " Ruppes");
dollar = amount *0.008;
System.out.println(amount + " yen = " + f.format(dollar) + " Dollar");
pound = amount *0.007;
System.out.println(amount + " yen = " + f.format(pound) + " Pound");
euro = amount *0.007;
System.out.println(amount + " yen = " + f.format(euro) + " Euro");
ringgit = amount *0.037;
System.out.println(amount + " yen = " + f.format(ringgit) + " ringgit");
break;
case 6: // Ringgit Conversion
rupee = amount *16.8;
System.out.println(amount + " ringgit = " + f.format(rupee) + " Ruppes");
dollar = amount *0.239;
System.out.println(amount + " ringgit = " + f.format(dollar) + " dollar");
pound = amount *0.188;
System.out.println(amount + " ringgit =: " + f.format(pound) + " pound");
euro = amount *0.209;
System.out.println(amount + " ringgit = " + f.format(euro) + " euro");
yen = amount *26.63;
System.out.println(amount + " ringgit = " + f.format(yen) + " yen");
break;
//Default case
default:
System.out.println("Invalid Input");
}
}
}
10
OUTPUT:
11
CONCLUSION:
In this project we successfully created the program for converting the various
currency in various foreign currency using the Java language and the concept of
object-oriented programming.
Currency converter that the people are using, they will always find ways to get the highest
possible profits out of the exchanges. To those who are going to travel, it is a wise thing
to check the different foreign exchange options they have
Therefore, currency converter is developed and used for knowing the currency’s value. It
can be further developed by including more currency options, and by shown currency value
table for user.
12
REFERENCE:
1.
https://projectworlds.in/java-projects-with-source-code/currency-converter-java-mini-
project/
2.
https://www.kashipara.com/project/java/1221/currency-converter-java-mini-project
3.
https://www.geeksforgeeks.org/java-program-to-convert-currency-using-awt/
13