0% found this document useful (0 votes)
17 views31 pages

Ajp Microproject

Uploaded by

luxurypointhub
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views31 pages

Ajp Microproject

Uploaded by

luxurypointhub
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

AJP(22517) Currency Converter

MICRO PROJECT REPORT

ON

“Currency Converter”

Submitted By

1. Shahane Pranav

Guided By

MR. Abhijeet Kurulekar Sir

TO

DEPARTMENT OF COMPUTER ENGINEERING

GRAMIN TECHNINICAL & MANAGEMENT CAMPUS,

VISHNUPURI, NANDED-431606

MAHARASHTRA STATE BOARD OF TECHNICAL


EDUCATION(MSBTE),MUMBAI

ACADEMIC YEAR 2024-25


1
AJP(22517) Currency Converter

PROJECT REPORT

ON

“Currency Converter”

SUBMITTED BY

1. Shahane Pranav

GUIDED BY

Mr. Abhijeet Kurulekar Sir

In Partial Fulfillment for the Award of the Diploma In

DEPARTMENT OF COMPUTER ENGINEERING

VISHNUPURI, NANDED431606

ACADEMIC YEAR 2024-25

2
AJP(22517) Currency Converter

CERTIFICATE

“Currency Converter”

Being submitted by Mr. Shahane Pranav to State Board Of Technical Education


Mumbai as a partial fulfillment of award of Diploma in COMPUTER
ENGINEERING is record of Bonafide work carried out by his / her under
supervision and guidance of MR. Abhijeet Kurulekar The assigned project is
performed satisfactorily in the academic year 2024-25.

MR. Abhijeet Kurulekar Mr. Pathan .F. S

Guide Head of Department

Dr. Pawar V.S

Principal 3
AJP(22517) Currency Converter

ACKNOWLEDGEMENT

I take this opportunity to express my deep sense of gratitude to word MR.Abhijeet


Kurulekar course in charge of Java Programming who has been a constant source
of inspiration to us and without his valuable guidance this work could not possible.
I am thankful to all faculty members of my Department also for their guidance,
support and encouragement for the accomplishment of our micro-project. I would
like to thankful to Mr.Pathan F.S HOD of COMPUTER DEPARTMENT (Poly)
for his valuable comments and suggestion for me to improve my creativity
regarding project work.
I also express my sincere thanks to my friends for their assistance and comments
for the betterment of this micro project.

Sincerely:
1. Shahane Pranav

4
AJP(22517) Currency Converter

Vision & Mission of Computer Engg. Department

The Department of Computer Engineering will be one of the Na onal leader,


catering dynamic IT knowledge to serve society and the globe at
large.

वव ◌ाथ याााां ना माववती व तााां ◌ान ◌े ◌ाचे काळानु प ◌ान व उे न

सााां गणक अववयाााां व क वववाग रा ◌ीय नेतृ वाचा एक व ◌◌ाग असले.

MISSION / जीववत कायय


Department of Computer Engineering will be role model for Computer
Engineers by:

1. Exposing the learners to latest tools and technologies in the field of


Computer, hardware and so ware.

१. सााां गणक व ◌◌ाववय ◌◌े अर व सॉ टवेअर ◌◌ातीले अ ◌ावत तााां ◌ान

व साधने वव याथ याााां ना ववकवणे.

5
AJP(22517) Currency Converter

2. Providing frui ul learning environment, enhancing problem solving


skills amongst the learners, to make them successful. २.

वव ◌ाथवयाााां चा वय वीसाठी फवलायी व वणक वातावरण तयार क न


याााां यामधील सोवव याचे कौव य ववकवसत करणे..
3. Support society by par cipa ng in and extending technological services.

३. समाजाला लागणा या सााां गणक य ताााावं क सेवा पुरवून समाजाचा आधार

बनणे.

PO 1. Basic knowledge: Apply knowledge of basic mathema cs, sciences


and basic engineering to solve the broad-based Electronics related
problems.
PO 2. Discipline knowledge: Apply Computer Programming
knowledge to solve broad- based Electronics related problems.
PO 3. Experiments and prac ce: Plan to perform experiments and prac
ces to use the results to solve broad-based Electronics related problems.
PO4. Engineering tools: Apply relevant Computer programming.
technologies and tools with an understanding of the limita ons.
PO 8. Individual and teamwork: Func on effec vely as a leader and team
member in diverse/ mul disciplinary teams.
PO 9. Communica on: Communicate effec vely in oral and wri en form.

6
AJP(22517) Currency Converter

ANNUEXURE II

Evaluation Sheet for the Micro Project

Academic Year: __2024-25________ Name of faculty: MR. Abhijeet Kurulekar

Course: ___CO_________ Course Code: _____CO5I________Semester: ____5th______

Title of Project: _______Currency Converter_____________________________________


Course outcome:

A. Develop programs using GUI framework (AWT and Swing).


B. Handle events of AWT and Swing components.
C. Develop programs to handle events in java programming.
D. Develop java programs using network concepts.

E. Develop programs using database.

F. Develop programs using servlets.

Major Learning Outcomes achieved by doing the Project.


a. PracticalOutcomes: ______________________________________________________
_________________________________________________________________________
__ b. Unit Outcomes in Cognitive domain: _____________________________________
_________________________________________________________________________
__
c. Outcomes in Affective Domain:______________________________________________

Roll Student Name Marks out of 6 Marks out of 4 for Total


No. for performance performance in out of
in group activity oral/ presentation
10
15 Shahane Pranav

(Name and Signature of Faculty)

7
AJP(22517) Currency Converter

Index
Sr. No Contents Page No.
Introduction 1
1
2 Need Of Currenct Converter 2-3

3 Brief Description Of Currency Converter 4

4 Implementation Details 5-7

5 Program 10-11

6 Advantage and Disadvantage 13-14

7 Applications 15

8 Conclusion 16

9 Reference 17

8
AJP(22517) Currency Convert

Introduction to Currency Conveter

This Java currency converter project offers a streamlined solution for converting
between major currencies. Leveraging Java's functionality, users can input an
amount in USD or INR and select their desired currency for conversion,
including EUR, GBP, and INR. Through this project, we'll explore fundamental
programming concepts while providing a practical tool for currency conversion.
Let's embark on this journey to build a versatile and efficient currency converter
in Java.

Currency converters are indispensable tools in today's globalized world, offering


the convenience and flexibility to convert between different currencies
effortlessly. Whether for travel, business, or personal finance, currency
converters provide users with the ability to understand and manage the value of
money across borders.

Need Of Currency Converter

In today's globalized world, where people travel, trade, and conduct business
internationally, the need for a currency converter is paramount. Here's why:
• Travel :

1
AJP(22517) Currency Convert

When traveling to different countries, it's essential to understand the value of your
money in the local currency. A currency converter helps travelers budget
effectively and make informed purchasing decisions.

• International Trade :

Businesses engaged in international trade must deal with multiple currencies. A


currency converter enables them to calculate accurate prices, manage finances,
and negotiate contracts across borders.

• Financial Transactions :

With the rise of e-commerce and online transactions, individuals often purchase
goods and services from foreign websites. A currency converter facilitates
seamless transactions by displaying prices in the user's preferred currency.

• Investments :

Investors diversify their portfolios by investing in assets denominated in various


currencies. A currency converter aids in evaluating investment opportunities and
assessing risk across different markets.

• Forex Trading :

2
AJP(22517) Currency Convert

Currency traders rely on real-time exchange rates to buy and sell currencies
for profit. A currency converter provides valuable insights and helps traders
make informed decisions in the volatile foreign exchange market.

• Remittances :

Migrant workers frequently send money back home to their families. A currency
converter ensures that recipients receive the correct amount of money after
currency conversion, minimizing losses due to unfavorable exchange rates.

In essence, a currency converter is an indispensable tool that simplifies financial


transactions, promotes international trade, and facilitates global connectivity in
today's interconnected world.

Brief Description of Currency Converter

Certainly! Let's break down the operations performed by the Currency


Converter in the provided Java code and how they are implemented:

Operations Performed:

1. Accept User Input :

3
AJP(22517) Currency Convert

The currency converter should accept user input for the amount to be converted
and the currencies involved.

2. Conversions Rates :

The converter needs conversion rates between different currencies. These rates
are predefined or fetched from an external source like an API.

3. Perform Conversions :

Based on the user input and conversion rates, the converter calculates the
equivalent amount in the desired currency.

4. Display Result :

Finally, the converter displays the converted amounts to the user.

By breaking down these operations, we can understand how the currency


converter performs each step, from accepting user input to displaying the
converted amounts, and how these operations are implemented in Java code.

Implementation Details

Currency conversion system is implemented to reduce human power to


automatically recognize the amount monetary value of currency and convert it
into the other currencies without human supervision.

Certainly! Here's a breakdown of the implementation details for each operation


performed by the currency converter in Java:

4
AJP(22517) Currency Convert

1. Accept User Input


2. Conversion Rates
3. Perform Conversions
4. Convert USD To Other Currencies
5. Display Results

1. Accept User Inputs :

• Use the CurrencyConverterSwing class to accept user input from the user.
• Prompt the user to enter the amount to convert and the currency to convert
from

2. Conversion Rates :

• Define conversion rates as variables, such as usdToEur, usdToGbp,


and usdToInr.
• These rates represent the conversion rate from USD to EUR, GBP, and
INR, respectively.
• Conversion rates can be predefined in the code or fetched from an
external source like an API

3. Perform Conversions :

• Based on the user's input currency, determine the equivalent amount in


USD.

5
AJP(22517) Currency Convert

• Use conditional statements (if-else or switch) to handle different input


currencies.
• Calculate the amount in USD by dividing the input amount by the
appropriate conversion rate.
• If the input currency is USD, set the amount in USD equal to the input
amount.
• Convert USD to Other Currencies:
• Once the amount in USD is determined, calculate the equivalent amounts
in other currencies.
• Multiply the amount in USD by the respective conversion rates to obtain
the converted amounts in EUR, GBP, and INR.

4. Convert USD To Other Currencies :

• Once the amount in USD is determined, calculate the equivalent amounts


in other currencies.
• Multiply the amount in USD by the respective conversion rates to obtain
the converted amounts in EUR, GBP, and INR.

5. Display Results :

• Print the converted amounts for each currency to the frame.


• Use Label to display the results in a user-friendly format.

Here's a summary of the implementation details:


Accept User Input

6
AJP(22517) Currency Convert

// Declare JTextField components to accept user input for amount and fromCurrency

private JTextField amountField; // For accepting the amount to convert

private JTextField fromCurrencyField; // For accepting the source currency (USD, EUR,
GBP, INR)

// User inputs are retrieved when the Convert button is clicked

// Convert button action listener

convertButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

try {

// Retrieve amount from amountField (user input as a double)

double amount = Double.parseDouble(amountField.getText());

// Retrieve source currency from fromCurrencyField (convert it to uppercase)

String fromCurrency = fromCurrencyField.getText().toUpperCase();

// Call the service to perform the currency conversion

CurrencyConverterService service = new CurrencyConverterService();

String convertedAmounts = service.convertCurrency(amount, fromCurrency)

// Update the resultLabel with the converted amounts

resultLabel.setText("<html>" + convertedAmounts + "</html>");

} catch (Exception ex) {

// If there's an error (e.g., invalid input), display an error message

resultLabel.setText("Error: " + ex.getMessage());

7
AJP(22517) Currency Convert

});//

Conversion Rates

// ConversionRate class stores the conversion rates for different currencies


public static class ConversionRate {
private double usdToEur = 0.85; // Conversion rate from USD to EUR
private double usdToGbp = 0.72; // Conversion rate from USD to GBP
private double usdToInr = 74.93; // Conversion rate from USD to INR

// Getter methods to retrieve the conversion rates


public double getUsdToEur() {
return usdToEur;
}
public double getUsdToGbp() {
return usdToGbp;
}
public double getUsdToInr() {
return usdToInr;
}
}

Convert USD to Other Currencies

public static class CurrencyConverterUtil {

8
AJP(22517) Currency Convert

// Converts the entered amount to USD based on the source currency


public static double convertToUSD(double amount, String fromCurrency,
ConversionRate rates) {
switch (fromCurrency) {
case "USD":
return amount; // If the source currency is USD, no conversion needed
case "EUR":
return amount / rates.getUsdToEur(); // Convert EUR to USD
case "GBP":
return amount / rates.getUsdToGbp(); // Convert GBP to USD
case "INR":
return amount / rates.getUsdToInr(); // Convert INR to USD
default:
throw new IllegalArgumentException("Invalid currency: " +
fromCurrency);
}
}
// Converts the USD amount to the target currency (EUR, GBP, INR)
public static double convertFromUSD(double amount, String toCurrency,
ConversionRate rates) {
switch (toCurrency) {
case "USD":
return amount; // If the target currency is USD, no conversion needed
case "EUR":
return amount * rates.getUsdToEur(); // Convert USD to EUR
case "GBP":

9
AJP(22517) Currency Convert

return amount * rates.getUsdToGbp(); // Convert USD to GBP


case "INR":
return amount * rates.getUsdToInr(); // Convert USD to INR
default:
throw new IllegalArgumentException("Invalid currency: " +
toCurrency);
}
}
}

10
AJP(22517) Currency Convert

Display Results

// resultLabel is where the conversion results are shown


resultLabel = new JLabel("Converted Amounts will be displayed here.");
resultLabel.setBounds(40, 180, 300, 25);
frame.getContentPane().add(resultLabel);

// After conversion, the resultLabel is updated with the converted values


resultLabel.setText("<html>" + convertedAmounts + "</html>");

Breakdown:

resultLabel: This is a JLabel that is used to display the conversion results on the
GUI. Initially, it's set to a placeholder text ("Converted Amounts will be displayed
here").

Updating JLabel: After the conversion is complete, the setText() method is called
to update the label with the conversion results. The conversion results are
formatted as HTML (<html> and </html> tags) so that the amounts for EUR,
GBP, and INR appear on separate lines.

11
AJP(22517) Currency Convert

Code :
import javax.swing.*;

import java.awt.*;

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

public class CurrencyConverter {

// Conversion Rate Model Class

public static class ConversionRate {

private double usdToEur = 0.85;

private double usdToGbp = 0.72;

private double usdToInr = 74.93;

public double getUsdToEur() {

return usdToEur;

public double getUsdToGbp() {

return usdToGbp;

public double getUsdToInr() {

return usdToInr;

// Currency Converter Utility Class

public static class CurrencyConverterUtil {

12
AJP(22517) Currency Convert

public static double convertToUSD(double amount, String fromCurrency,


ConversionRate rates) {

switch (fromCurrency) {

case "USD":

return amount;

case "EUR":

return amount / rates.getUsdToEur();

case "GBP":

return amount / rates.getUsdToGbp();

case "INR":

return amount / rates.getUsdToInr();

default:

throw new IllegalArgumentException("Invalid currency: " +


fromCurrency);

public static double convertFromUSD(double amount, String toCurrency,


ConversionRate rates) {

switch (toCurrency) {

case "USD":

return amount;

case "EUR":

return amount * rates.getUsdToEur();

case "GBP":

return amount * rates.getUsdToGbp();

case "INR":

13
AJP(22517) Currency Convert

return amount * rates.getUsdToInr();

default:

throw new IllegalArgumentException("Invalid currency: " + toCurrency);

// Currency Converter Service Class

public static class CurrencyConverterService {

private ConversionRate conversionRate

public CurrencyConverterService() {

this.conversionRate = new ConversionRate();

public String convertCurrency(double amount, String fromCurrency) {

double amountUSD = CurrencyConverterUtil.convertToUSD(amount,


fromCurrency, conversionRate);

// Store converted values in an array

String[] result = new String[3];

result[0] = "EUR: " +


CurrencyConverterUtil.convertFromUSD(amountUSD, "EUR", conversionRate);

result[1] = "GBP: " + CurrencyConverterUtil.convertFromUSD(amountUSD,


"GBP", conversionRate);

result[2] = "INR: " + CurrencyConverterUtil.convertFromUSD(amountUSD,


"INR", conversionRate);

// Return the result as a formatted string

return result[0] + "<br>" + result[1] + "<br>" + result[2];

14
AJP(22517) Currency Convert

// Main GUI Application Class

public static class CurrencyConverterSwing {

private JFrame frame;

private JTextField amountField;

private JTextField fromCurrencyField;

private JLabel resultLabel;

public static void main(String[] args) {

SwingUtilities.invokeLater(() -> {

try {

CurrencyConverterSwing window = new CurrencyConverterSwing();

window.frame.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

});

public CurrencyConverterSwing() {

initialize();

private void initialize() {

// Create the main frame

frame = new JFrame();

frame.setBounds(100, 100, 400, 300);

15
AJP(22517) Currency Convert

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().setLayout

// Title label

JLabel titleLabel = new JLabel("Currency Converter");

titleLabel.setFont(new Font("Arial", Font.BOLD, 16));

titleLabel.setBounds(120, 10, 160, 25);

frame.getContentPane().add(titleLabel);

// Amount label and field

JLabel amountLabel = new JLabel("Amount:");

amountLabel.setBounds(40, 50, 80, 25);

frame.getContentPane().add(amountLabel);

amountField = new JTextField();

amountField.setBounds(130, 50, 150, 25);

frame.getContentPane().add(amountField);

// From Currency label and field

JLabel fromCurrencyLabel = new JLabel("From Currency:");

fromCurrencyLabel.setBounds(40, 90, 100, 25);

frame.getContentPane().add(fromCurrencyLabel);

fromCurrencyField = new JTextField();

fromCurrencyField.setBounds(130, 90, 150, 25);

frame.getContentPane().add(fromCurrencyField);

// Convert button

JButton convertButton = new JButton("Convert");

16
AJP(22517) Currency Convert

convertButton.setBounds(140, 130, 100, 30);

frame.getContentPane().add(convertButton);

// Result label

resultLabel = new JLabel("Converted Amounts will be displayed here.");

resultLabel.setBounds(40, 180, 300, 25);

frame.getContentPane().add(resultLabel);

// Action listener for the button

convertButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

try {

double amount =Double.parseDouble(amountField.getText());

String fromCurrency = fromCurrencyField.getText().toUpperCase();

CurrencyConverterService service = new CurrencyConverterService();

String convertedAmounts = service.convertCurrency(amount, fromCurrency);

resultLabel.setText("<html>" + convertedAmounts + "</html>");

} catch (Exception ex) {

resultLabel.setText("Error: " + ex.getMessage());

});

17
AJP(22517) Currency Convert

OUTPUT :

18
AJP(22517) Currency Convert

Advantages

1. Global Accessibility: Currency converters enable individuals and


businesses worldwide to access real-time exchange rates and perform
currency conversions effortlessly, regardless of their location.

2. Convenience: With currency converters available online and through


mobile apps, users can quickly convert currencies anytime, anywhere,
making it convenient for travel, business, and personal finance management.

3. Accurate Exchange Rates : Currency converters provide up-to-date


and accurate exchange rates sourced from reliable financial institutions or
APIs, ensuring users receive precise conversion results.

4. Financial Planning: Currency converters assist users in budgeting,


financial planning, and decision-making by allowing them to calculate costs,
expenses, and investments in multiple currencies accurately.

5. Facilitates International: Businesses engaged in international trade


rely on currency converters to quote prices, negotiate contracts, and manage
currency risk effectively, facilitating smoother transactions and global
commerce.

19
AJP(22517) Currency Convert

Disadvantages

1. Exchange Rates Variability: Exchange rates fluctuate constantly due to


market dynamics, geopolitical events, and economic factors. As a result, the
conversion amount provided by currency converters may not always reflect the
actual rate at the time of transaction, leading to potential discrepancies.

2. Hidden Fees: Some currency converters may impose hidden fees or


markups on exchange rates, resulting in additional costs for users. These fees are
often undisclosed or not clearly stated upfront, leading to unexpected expenses
and reduced transparency.

3. Limited Accuracy: Despite providing real-time exchange rates, currency


converters may not always offer accurate or precise conversion amounts. Factors
such as rounding errors, outdated data, and differences in conversion
methodologies can affect the accuracy of conversion results.

4. Limited Currency Coverage: Some currency converters may have


limited coverage of currencies, particularly for exotic or less commonly traded
currencies. Users may encounter difficulties in converting certain currencies or
accessing accurate exchange rates for specific currency pairs.

20
AJP(22517) Currency Convert

Application

Here are the applications of the task scheduling manager:

1. Travel Planning.

2. International Trade.

3. Financial Management.

4. E-Commerce.

5. Remittances.

6. Financial Education.

7. Investment analysis.

8. Business Travel Expenses.

Overall , currency converters play a vital role in enabling cross-border


transactions, facilitating international commerce, and empowering individuals
and businesses to navigate the complexities of the global financial landscape with
confidence and efficiency.

21
AJP(22517) Currency Convert

Conclusion

In Conclusion , currency converters are essential tools that enable quick and
accurate conversion between different currencies. They find applications in
travel, international trade, financial management, e-commerce, remittances,
education, investment analysis, and business expense management. Despite
their benefits, users should be aware of potential limitations and risks
associated with exchange rate variability, hidden fees, security concerns,
and regulatory challenges. Overall, currency converters play a crucial role
in promoting global connectivity, financial transparency, and economic
efficiency.

Overall, currency converters contribute to global connectivity, financial


transparency, and economic efficiency by facilitating cross-border
transactions, promoting international commerce, and empowering
individuals and businesses to navigate the complexities of the global
financial landscape with ease and confidence. As technology continues to
evolve and global markets become increasingly interconnected, currency
converters will remain essential tools for facilitating currency exchange and
fostering global economic integration.

22
AJP(22517) Currency Convert

References

• https://chat.openai.com/c/194ff79c-f0f1-44e9-90a7-2c1456d4b922

• https://m.youtube.com

• https://www.jobrunr.io/en/blog/2023-02-13-currency-converter/

23

You might also like