You are on page 1of 8

TERM PROJECT

TOPIC: CURRENCY CONVERTER

SUBMITTED BY: NANDAKIRAN VELAGA


ROLL NO: 20115108
SEMESTER: 3RD
BRANCH: COMPUTER SCIENCE AND ENGINEERING
Introduction

There are around 200+ different currencies used in different


countries around the world. Conversion from one currency to another
is a very important endeavor especially when it comes to marketing
and travel. 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.
So in this project we will create a currency converter that helps us to
convert the value of Indian rupees(INR) to dollars and vice versa.
Working and Presentation of GUI:
First, we create a frame using JFrame.
Then, we create two labels, two textfields and three buttons(the first button for rupees and
the second button is for the dollar) using JLabel, JTextField and JButton.
Now, we name these components accordingly and set their bounds.
Now, in order to perform the conversion on button click, we need to add Event Handlers. In
this case, we will add ActionListener to perform an action method known as
actionPerformed in which first we need to get the values from the text fields which is
default as a “string”.
So, in order to perform mathematical operations, we need to convert them into double data
type using Double.parseDouble(Object.getText()) and again converting from double to
string to place the final value in the other text field using String.valueOf(object).
Finally, for changing the values, we use Object.setText(object), the second object is for
selecting which field we want to replace.
OUTPUT:
1.The window displayed on running the program:
2. Converting from INR to the Dollar, i.e., when INR button is clicked:
3. Converting from the Dollar to INR, i.e., when the dollar button is clicked:
Conclusion:

So using this currency converter we can convert any value of


INR to dollars. And dollars to INR, this will be helpful for the
people who uses international transactions. And will make
their conversion easier with less effort.
THANK YOU

You might also like