You are on page 1of 23

Project report on

Currency Converter

Semester :5th

Department : Computer Engineering


Submitted to

GOVERNMENT POLYTECHNIC, NANDURBAR

Under the guidance of

Prof. K.S.Patil Teacher lecturer in


Advance Java (22517)

Government Polytechnic, Nandurbar.


MAHARASHTRA STASTE BOARD OF TECHNICAL
EDUCATION
CERTIFICATE

This is certify that Mr. / Miss. Anurag Pawar,Sanika Patil,Farina Pathan, Firdos Pathan Roll No
(3142,3148,3149,3150)
Fifth semester of Diploma in computer Engineering of institute Government
Polytechnic, Nandurbar has completed the Micro Project satisfactorily in the
subject Advance Java (22517) for the Academic Year 2023-2024 as prescribed
in the curriculum.

PLACE: Nandurbar ENROLLMENT NO:2114320039

2114320057

2114320058

2114320061
DATE: EXAM SEAT NO:

Subject Teacher Head of the Department Principal

Seal of
Institution
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION,MUMBAI
Evaluation sheet for the Micro project

Academic Year: 2023-24 Semester: Fifth

Course : Advance Java Course code: 22517

Title of Project : “Currency Converter”

Roll No Name of Student


3142 Anurag Vijay Pawar
3148 Firdos Faridkha Pathan
3149 Farina Faridkha Pathan
3150 Sanika Shriram Patil
…Index…

Sr. No Title Page No

1 Abstract 4

2 Source Code 5

3 Output of the Program 6

4 Literature Review and References 6

5 Conclusion 7

5 Weekly Work / Progress Report 7

6 Evaluation Sheet 8
1. Abstract…
Currency converter (or currency exchange) is a mini project coded in Java programming
language. This simple application provides a web-based interface for exchanging/converting
money from one currency (say $) to another currency (say €).

Different countries use different currencies, 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 -like
app developed using Ajax, Java servlets web features. In this application, there is a regular
update about the currency of every country by which it displays the 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 takes place on a daily
basis.

In this Project We Use Swing Components. Swing is a part of the JFC (Java Foundation Classes).
Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains
a large set of components which allow a high level of customization and provide rich
functionalities, and is used to create window-based applications. Java swing components are
lightweight, platform-independent, provide powerful components like tables, scroll panels,
buttons, list, colour chooser, etc
2. Source Code
Currency converter

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package Currency_Converter;

/**

*@

*/

public class CurrencyConverter extends javax.swing.JFrame {

double US_Dollar = 1.31;

double Nigerian_Naira = 476.57;

double Brazilian_Real = 5.47;

double Canadian_Dollar = 1.71;

double Kenyan_Shilling = 132.53;

double Indonesian_Rupiah = 19554.94;

double Indian_Rupee = 95.21;

double Philippine_Pisco = 71.17;

double Pakistani_Rupee = 162.74;

String[] currencyUnits = {

"Units",

"US Dollar",
"Nigerian Naira",

"Brazilian Real",

"Canadian Dollar",

"Kenyan Shilling",

"Indonesian Rupiah",

"Indian Rupee",

"Philippine Pisco",

"Pakistani Rupee"

};

/**

* Creates new form CurrencyConverter

*/

public CurrencyConverter() {

initComponents();

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

private void initComponents() {

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

firstCountry = new javax.swing.JComboBox<>();


secondCountry = new javax.swing.JComboBox<>();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

t1 = new javax.swing.JTextField();

t2 = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jButton3 = new javax.swing.JButton();

secondCurrencyUnit = new javax.swing.JLabel();

firstCurrencyUnit = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 5));

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N

jLabel1.setText("Currency Converter");

firstCountry.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

firstCountry.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Choose One...",


"USA", "Nigeria", "Brazil", "Canada", "Kenyan", "Indonesia", "India", "Philippine", "Pakistan" }));

firstCountry.addItemListener(new java.awt.event.ItemListener() {

public void itemStateChanged(java.awt.event.ItemEvent evt) {

firstCountryItemStateChanged(evt);

});

firstCountry.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


firstCountryActionPerformed(evt);

});

secondCountry.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

secondCountry.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Choose


One...", "USA", "Nigeria", "Brazil", "Canada", "Kenyan", "Indonesia", "India", "Philippine", "Pakistan" }));

secondCountry.addItemListener(new java.awt.event.ItemListener() {

public void itemStateChanged(java.awt.event.ItemEvent evt) {

secondCountryItemStateChanged(evt);

});

jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jLabel2.setText("From currency Of");

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jLabel3.setText("To currency Of");

t1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

t2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

jButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

jButton1.setText("Convert Currency");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);
}

});

jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

jButton2.setText("Reset");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jButton3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

jButton3.setText("Exit");

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});

secondCurrencyUnit.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

secondCurrencyUnit.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

secondCurrencyUnit.setText("units");

firstCurrencyUnit.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

firstCurrencyUnit.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);

firstCurrencyUnit.setText("units");

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);


jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel1)

.addGap(290, 290, 290))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(93, 93, 93)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton1)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)

.addComponent(firstCountry, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)

.addComponent(t1)

.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 131,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(firstCurrencyUnit, javax.swing.GroupLayout.DEFAULT_SIZE, 277,


Short.MAX_VALUE)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(81, 81, 81)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel3)

.addComponent(secondCountry, 0, 272, Short.MAX_VALUE)

.addComponent(t2))
.addComponent(secondCurrencyUnit, javax.swing.GroupLayout.PREFERRED_SIZE, 277,
javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(11, 11, 11)

.addComponent(jButton2)

.addGap(94, 94, 94)

.addComponent(jButton3)))

.addContainerGap(114, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel1)

.addGap(28, 28, 28)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel2)

.addComponent(jLabel3))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)

.addComponent(firstCountry, javax.swing.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)

.addComponent(secondCountry))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)

.addComponent(t1, javax.swing.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)

.addComponent(t2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(secondCurrencyUnit, javax.swing.GroupLayout.PREFERRED_SIZE, 20,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(23, 23, 23))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addComponent(firstCurrencyUnit, javax.swing.GroupLayout.PREFERRED_SIZE, 20,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton1)

.addComponent(jButton2)

.addComponent(jButton3))

.addContainerGap(57, Short.MAX_VALUE))

);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_jButton3ActionPerformed

System.exit(0);

}//GEN-LAST:event_jButton3ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_jButton2ActionPerformed

firstCountry.setSelectedIndex(0);

secondCountry.setSelectedIndex(0);

t1.setText("");

t2.setText("");

}//GEN-LAST:event_jButton2ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_jButton1ActionPerformed
double amountToChange=Double.parseDouble(t1.getText());

double amountChanged=0.0;

double amountInPounds=0.0;

switch(firstCountry.getSelectedItem().toString())

case "USA": amountInPounds = amountToChange/US_Dollar;brake;

case "Nigeria":amountInPounds = amountToChange/Nigerian_Naira;break;

case "Brazil":amountInPounds = amountToChange/Brazilian_Real;break;

case "Canada":amountInPounds = amountToChange/Canadian_Dollar;break;

case "Kenyan":amountInPounds = amountToChange/Kenyan_Shilling;break;

case "Indonesia":amountInPounds = amountToChange/Indonesian_Rupiah;break;

case "India":amountInPounds = amountToChange/Indian_Rupee;break;

case "Philippine":amountInPounds = amountToChange/Philippine_Pisco;break;

case "Pakistan":amountInPounds = amountToChange/Pakistani_Rupee;break;

default:amountInPounds = 0.0;

//amount is Changed in pounds

switch(secondCountry.getSelectedItem().toString())

case "USA":amountChanged = amountInPounds * US_Dollar;break;

case "Nigeria":amountChanged = amountInPounds * Nigerian_Naira;break;

case "Brazil":amountChanged = amountInPounds * Brazilian_Real;break;

case "Canada":amountChanged = amountInPounds * Canadian_Dollar;break;

case "Kenyan":amountChanged = amountInPounds * Kenyan_Shilling;break;


case "Indonesia":amountChanged = amountInPounds * Indonesian_Rupiah;break;

case "India":amountChanged = amountInPounds * Indian_Rupee;break;

case "Philippine":amountChanged = amountInPounds * Philippine_Pisco;break;

case "Pakistan":amountChanged = amountInPounds * Pakistani_Rupee;break;

default:amountChanged = amountInPounds * 0.0;

String value = String.format("%.2f",amountChanged);

t2.setText(value);

}//GEN-LAST:event_jButton1ActionPerformed

private void firstCountryActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_firstCountryActionPerformed

// TODO add your handling code here:

}//GEN-LAST:event_firstCountryActionPerformed

private void firstCountryItemStateChanged(java.awt.event.ItemEvent evt)


{//GEN-FIRST:event_firstCountryItemStateChanged

firstCurrencyUnit.setText(currencyUnits[firstCountry.getSelectedIndex()]);

}//GEN-LAST:event_firstCountryItemStateChanged

private void secondCountryItemStateChanged(java.awt.event.ItemEvent evt)


{//GEN-FIRST:event_secondCountryItemStateChanged

secondCurrencyUnit.setText(currencyUnits[secondCountry.getSelectedIndex()]);

}//GEN-LAST:event_secondCountryItemStateChanged

/**
* @param args the command line arguments

*/

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(CurrencyConverter.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(CurrencyConverter.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(CurrencyConverter.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {


java.util.logging.Logger.getLogger(CurrencyConverter.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

//</editor-fold>

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new CurrencyConverter().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JComboBox<String> firstCountry;

private javax.swing.JLabel firstCurrencyUnit;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JPanel jPanel1;

private javax.swing.JComboBox<String> secondCountry;

private javax.swing.JLabel secondCurrencyUnit;

private javax.swing.JTextField t1;


private javax.swing.JTextField t2;

// End of variables declaration//GEN-END:variables

Output:
Literature Review & references:
Books references:
1) Java programming Language

Sites references:
1) www.google.com
2) www.javaTpoint
3) www.Geeksforgeeks
4) http://learnegene.blogspot.com

● Conclusion

From this Microproject We understand the concept of swing .An easily


accessible online currency converter is very useful to show travelers how their
own currencies will fare when exchanged with other foreign currency.
Moreover, currency converters help international import and export
businesses by helping them determine the selling and buying profits of
different products.
Weekly Work / Progress Report …
Details of 16 Engagement Hours of the Student
Regarding Completion of the Project
Timing
Sign
Week Durati
Date Work or activity Performed of the
No. Fro
To on in Guide
m
hours

3.00 4.00 Discussion and Finalization of the


1 3 / 9 /2023 30 min
pm pm Project Title

4.00 4.30 Preparation and Submission of


2 5 / 9 /2023 30 min
Pm pm Abstracts

3.00 3.30
3 7 / 9 /2023 30 min Literature Review
Pm Pm

4.00 6.00
4 11 / 9 /2023 2 hours Collection of Data
Pm Pm

3.00 3.30
5 1 / 10/2023 30 min Collection of Data
Pm Pm

3.30 4.30
6 1 / 10/2023 1 hour Discussion and Outline of Content
Pm Pm

2 / 10 /2023
3.00 4.00
7 1 hour Rough Writing of the Projects Contents
Pm Pm

3.00 4.00 Editing and Proofreading of the


8 2 / 10/2023 1 hour
Pm Pm Contents

3.00 4.00
9 5 / 10/2023 1 hour Final Completion of the Project
Pm Pm
45 min Seminar Presentation, viva-vice,
10
3.00 4.00 Assessment and Submission of Report
16 / 10/2023
Pm Pm
ANEXURE-II

Evaluation Sheet for the Micro Project (Teachers Copy)

Academic
Name of Guider: K.S.Patil
Year:-2023-2024
Sem :- Fifth Program Name : Advance Java
Course Name: : Course Code: 22517
Environmental Studies

Name of Students:- 1) Anurag Vijay Pawar


2) Firdos Faridkha Pathan
3) Farina Faridkha Pathan
4) Sanika Shriram Patil

Title of the Project:- Currency Converter


➢ COs addressed by the MicroProject:

(A)
MajorLearningOutcomesachievedbystudentsbydoingtheProject:
(B) (a) PracticalOutcomes:
(b) Using
(c) Outcomes (in Cognitive domain)
(d) Outcomes in AffectiveDom
(e) Comment/Suggestions about teamwork/leadership/interpersonal
Communication
(f) (f)
+ All the team members were co-operative and helped each other. The team members gave full
support. Rather, there was no mis-understanding among any of any of the teammembers.

Name of student Total marks Total marks Total Remarks


Out of Out of marks

Anurag Vijay
Pawar
Firdos Faridkha
Pathan
Farina Faridkha
Pathan
Sanika Shriram
Patil

( )

Teacher sign

You might also like