0% found this document useful (0 votes)
34 views

Java Final PDF

This document summarizes a currency converter microproject created by a student named Aditi Vaibhav Apte. The project uses Java GUI and networking concepts to allow users to enter an amount in Indian Rupees and displays the converted values in Euros, Canadian Dollars, Brazilian Real, US Dollars, and Swiss Francs by connecting to a server. The code for the client application is presented, which uses AWT components, action listeners, and networking to send the input to the server and receive the converted values back.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Java Final PDF

This document summarizes a currency converter microproject created by a student named Aditi Vaibhav Apte. The project uses Java GUI and networking concepts to allow users to enter an amount in Indian Rupees and displays the converted values in Euros, Canadian Dollars, Brazilian Real, US Dollars, and Swiss Francs by connecting to a server. The code for the client application is presented, which uses AWT components, action listeners, and networking to send the input to the server and receive the converted values back.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Marathwada Mitra Mandal’s Polytechnic

Thergaon Pune-33

V Semester
(Year: 2022-23)
Micro Project

Diploma in Computer Engineering

Title: Currency Converter


Name of the Student: Aditi Vaibhav Apte
Branch: Computer

Members of the Group


1. Aditi Vaibhav Apte Roll No. 200304
Maharashtra State Board of Technical Education, Mumbai

CERTIFICATE

This is to certify that Ms. Aditi Vaibhav Apte Roll No. 200304 of Fifth

Semester of Diploma in Engineering of Marathwada Mitra Mandal’s

Polytechnic has completed the Micro Project satisfactorily in course

Advanced Java Programming (22517) for the academic year 2022-23 as

prescribed in the curriculum.

Place:- Pune Enrollment No:-2009890056

Date 07/12/2022 Exam Seat No:- __________

Subject Teacher HOD Principal

Institute Seal
Teacher Evaluation Sheet for Micro Project

Name of the student: Aditi Vaibhav Apte

Course Title and Code: Advanced Java Programming.

Title of the Project: Currency Converter

COs addressed by the Micro Project

1. Develop Programs using GUI Framework.


2. Handle events of AWT and swings components.
3. Develop java programs to handle events in java programming.
4. Develop java programs using networking concepts.

Major Learning Outcomes achieved by students by doing the project


(a) Practical Outcomes
1. Write a program to demonstrate the use of component like label, TextField ,TextArea,
Button ,CheckBox, RadioButton .
2. Write a program to demonstrate use of DataGramSocket and DataGarmPacket.

(b) Unit Outcomes (in Cognitive Domain)


1. Develop GUI programs usinf given AWT components for the given problem.
2. Use delegation event model to develop event driven programs for the given problem.
3. Write a program to illustrate Client/server communication using datagram protocol for
given problem.
(c) Outcomes in Affective Domain
▪ Work in teams & Self-learning
▪ Demonstrate working as a leader/a team member

Any other Comment


______________________________________________________________________________
Marks
(A) Marks for Group Work : ______________________

(B) Marks obtained by the individual based on viva: ______________________

(C) Name of Student: _______________________

(D) Total Marks (A+B)=

Name and designation of Faculty Member:

Signature: _____________________________________________
Maharashtra State Board of Technical Education, Mumbai
MICRO PROJECT
Project work Report
Name of the Student: Aditi Vaibhav Apte

Program: Computer Roll No. 200304

Week Duration Sign of


Date Work Activity Performed
No in Hrs. Faculty
1 19/10/2022 1 Teacher assigns topic of project

20/10/2022 1 I have discussed topic with Faculty


2
3 21/10/2022 1 Started searching for basic ideas for it

4 03/11/2022 1 Started searching for basic ideas for it

5 04/11/2022 1 Gather some basic information related to project

6 05/11/2022 1 I have checked information by teacher gathered by


me
7 07/11/2022 1 Started working on project
8 10/11/2022 1 Working on project
9 14/11/2022 1 Working on project

10 17/11/2022 1 Working on project

11 21/11/2022 1 Collect information for report

12 30/11/2022 1 Working on project report

13 01/12/2022 1 Working on project report

14 05/12/2022 1 I have completed report for project

15 06/12/2022 1 approved all the work from subject teacher

16 07/12/2022 1 I have submitted micro-project


Advanced Java Programming

Topic: - Currency Converter

MICROPROJECT
Aditi Vaibhav Apte (200304)
Currency Converter

Index

Sr No Title Page No

1. Introduction 01

2. Data Flow Diagram 02

3. Code of Project 03-08

4. Screen Shot of output 09

5. Conclusion 10

6. References 11

MM POLYTECHNIC ,PUNE
Currency Converter

Certificates

MM POLYTECHNIC ,PUNE
Currency Converter

Introduction

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 microproject project is built keeping this thing in mind. It is simply
a calculator-like app developed using Advanced Java features. In this application, 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 takes place on a daily
basis.

In this currency converter , users are provide value in rupees .This simple feature allows
users to enter amount and get Converted into Different currency like Euro , Canadian Dollar ,
Brazilian Real , United States Dollar, Swiss franc etc.

In this Currency Converter GUI is developed using AWT components are used . it is
handled using Action Event And Networking is used to perform actual conversion of currency.

MM POLYTECHNIC , PUNE 1
Currency Converter

Data Flow Diagram

Client enters input


in rupees

Client provide
input to server

Server made the


conversions

Canadian Brazilian United


Euro Swiss franc
Dollar Real States Dollar

Server returns
the conversion
to client

MM POLYTECHNIC , PUNE 2
Currency Converter

Code of Project

Client

import java.awt.*;
import java.net.*;
import java.awt.event.*;
public class CC extends Frame implements ActionListener
{ TextField t1, t2, t3, t4, t5, t6; String input, eur ,cad , brl, usd,chf;
CC ()
{
setLayout(new FlowLayout());
Label l1 = new Label("Currency Converter");
add(l1);
Label l2 = new Label(" Enter Currency In Rupees(INR) ");
add(l2);
t1 = new TextField(20);
add(t1);
Label l3 = new Label(" Converted into Euro (EUR) ");
add(l3);
t2= new TextField(20);
add(t2);
Label l4 = new Label(" Converted into Canadian Dollar (CAD) ");
add(l4);
t3 = new TextField(20);
add(t3);
Label l5 = new Label(" Converted into Brazilian Real(BRL) ");
add(l5);
t4 = new TextField(20);
add(t4);

MM POLYTECHNIC , PUNE 3
Currency Converter

Label l6 = new Label(" Converted into United States Dollar(USD) ");


add(l6);
t5 = new TextField(20);
add(t5);
Label l7 = new Label(" Converted into Swiss franc(CHF) ");
add(l7);
t6 = new TextField(20);
add(t6);
Button b1 = new Button("Convert");
add(b1);
b1.addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
input = t1.getText();
byte[] sendnum = new byte[1024];
byte[]receur= new byte[1024];
byte[]reccad= new byte[1024];
byte[]recbrl= new byte[1024];
byte[]recusd= new byte[1024];
byte[]recchf= new byte[1024];

String str =ae.getActionCommand();


if(str.equals("Convert"))
{
try
{
DatagramSocket ds = new DatagramSocket();
InetAddress ip =InetAddress.getLocalHost();
sendnum = input.getBytes();

MM POLYTECHNIC , PUNE 4
Currency Converter

DatagramPacket dp = new
DatagramPacket(sendnum,sendnum.length,ip,2000);
ds.send(dp);
DatagramPacket dp1 = new DatagramPacket(receur,receur.length);
ds.receive(dp1);
eur= new String(dp1.getData(),0,dp1.getLength());
t2.setText(""+eur);
DatagramPacket dp2 = new DatagramPacket(reccad,reccad.length);
ds.receive(dp2);
cad= new String(dp2.getData(),0,dp2.getLength());
t3.setText(""+cad);
DatagramPacket dp3 = new DatagramPacket(recbrl,recbrl.length);
ds.receive(dp3);
brl= new String(dp3.getData(),0,dp3.getLength());
t4.setText(""+brl);
DatagramPacket dp4 = new DatagramPacket(recusd,recusd.length);
ds.receive(dp4);
usd = new String(dp4.getData(),0,dp4.getLength());
t5.setText(""+usd);
DatagramPacket dp5 = new DatagramPacket(recchf,recchf.length);
ds.receive(dp5);
chf=new String(dp5.getData(),0,dp5.getLength());
t6.setText(""+chf);
}
catch(Exception e){}}
}
public static void main(String args[])throws Exception
{
CC obj = new CC();
obj.setSize(300,500);

MM POLYTECHNIC , PUNE 5
Currency Converter

obj.setVisible(true);

obj.setTitle("Currency Converter");
}
}

MM POLYTECHNIC , PUNE 6
Currency Converter

Server
import java.net.*;
public class CS
{
public static void main(String args[])throws Exception
{
DatagramSocket ds = new DatagramSocket(2000);
byte[] recdnum = new byte[1024];
byte[]sendeur= new byte[1024];
byte[]sendcad= new byte[1024];
byte[]sendbrl= new byte[1024];
byte[]sendusd= new byte[1024];
byte[]sendchf= new byte[1024];
String input , S1 ,S2,S3 ,S4, S5; double value , eur , cad , brl , usd , chf ;
DatagramPacket dp = new DatagramPacket(recdnum,recdnum.length);
ds.receive(dp);
input = new String(dp.getData(), 0 ,dp.getLength());
value =Integer.parseInt(input);
InetAddress ip =InetAddress.getLocalHost();
eur = (value*0.0117570855);
S1=new String(""+eur );
sendeur=S1.getBytes();
DatagramPacket dp1 = new
DatagramPacket(sendeur,sendeur.length,ip,dp.getPort());
ds.send(dp1);
cad = (value*0.0164093503);
S2=new String(""+cad );
sendcad=S2.getBytes();
DatagramPacket dp2 = new
DatagramPacket(sendcad,sendcad.length,ip,dp.getPort());
ds.send(dp2);

MM POLYTECHNIC , PUNE 7
Currency Converter

brl = (value*0.0662422753);
S3=new String(""+brl );
sendbrl=S3.getBytes();
DatagramPacket dp3 = new
DatagramPacket(sendbrl,sendbrl.length,ip,dp.getPort());
ds.send(dp3);
usd = (value*0.0122444132);
S4=new String(""+usd );
sendusd=S4.getBytes();
DatagramPacket dp4 = new
DatagramPacket(sendusd,sendusd.length,ip,dp.getPort());
ds.send(dp4);
chf = (value*0.0115831292);
S5=new String(""+chf );
sendchf=S5.getBytes();
DatagramPacket dp5 = new
DatagramPacket(sendchf,sendchf.length,ip,dp.getPort());
ds.send(dp5);

}
}

MM POLYTECHNIC , PUNE 8
Currency Converter

Screen Shot Output

MM POLYTECHNIC , PUNE 9
Currency Converter

Conclusion

By developing this Microproject i am able to develop GUI using AWT components .

Develop java programs to handle events in java programming.

Develop java programs using networking concepts.

MM POLYTECHNIC , PUNE 10
Currency Converter

References

https://ijarcce.com/wp-content/uploads/2021/06/IJARCCE.2021.10590.pdf

https://github.com/projectworldsofficial/currency-converter-in-java

https://www.geeksforgeeks.org/java-program-to-convert-currency-using-awt/

https://www.scaler.com/topics/currency-converter-java-project/

MM POLYTECHNIC , PUNE 11

You might also like