Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

KONERU LAKSHMAIAH EDUCATIONAL FOUNDATION

(DEEMED TO BE UNIVERSITY)

Department of Computer Science Engineering


Course code -1

Dynamic Web Publishing


III B. Tech – 2nd Semester

Academic Year 2018-2019

Project Based Lab

ON
CURRENCY CONVERTER
Submitted by
Section – 20
Batch No: 3

Student Id no – Name

16003014
B.UJWALA
7
16003045
G.DIVYA SAI
5
16003051
K.JEEVANA
8
16003052
J.DIVYA SAI
1

1
KONERU LAKSHMAIAH EDUCATIONAL FOUNDATION
(DEEMED TO BE UNIVERSITY)

DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

(DST-FIST Sponsored Department)

CERTIFICATE
This is to certify that the course based project entitled Currency Converter is a
bonafide work done by B.UJWALA,G.DIVYA SAI,K.JEEVANA,J.DIVYA SAI in partial
fulfilment of the requirement for the award of degree in BACHELOR OF TECHNOLOGY
in Computer Science Engineering during the academic year 2018-2019.

Faculty In Charge Head of the Department

Dr.Siva Shankar Dr.V.Hari Kiran

2
DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

(DST-FIST Sponsored Department)

DECLARATION

We here by declare that this project based lab report entitled Currency Converter has
been prepared by us in partial fulfilment of the requirement for the award of degree
“BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE ENGINEERING”
during the academic year 2018-2019.

We also declare that this project based lab report is of our own effort and it has not
been submitted to any other university for the award of any degree.

Date:
Place: Vaddeswaram.

3
ACKNOWLEDGMENT

My sincere thanks Dr.Siva Shankar in the Lab for their outstanding support throughout

the project for the successful completion of the work

We express our gratitude to Dr. V.Hari Kiran, Head of the Department for Computer

Science and Engineering for providing us with adequate facilities, ways and means by which

we are able to complete this term paper work.

We would like to place on record the deep sense of gratitude to the honourable Vice

Chancellor, K L University for providing the necessary facilities to carry the concluded term

paper work.

Last but not the least, we thank all Teaching and Non-Teaching Staff of our department and

especially my classmates and my friends for their support in the completion of our term paper

work.

4
ABSTRACT :
In finance, an exchange rate between two currencies is the rate between two currencies is the
rate at which one currency will be exchanged for another.it is a useful tool which gives us the
value of certain amount of one currency to be converted in to a different currency.it is also
regarded as the value of one country’s currency in terms of another currency. In this project
we are going to display a web window in which currency options are given and the
conversion value is displayed in the next window. 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-like app developed using Ajax, Java servlets web
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.

5
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 you had $1 that needed to
be exchanged into the local currency of a country you are visiting, you would need to know
the dollar-euro conversion, if you were traveling to certain parts of Europe, the dollar-pound
conversion if you were in traveling in the United Kingdom, the dollar-yen conversion if you
were traveling in Japan, the Canadian dollar-U.S. dollar conversion if you were traveling in
Canada or the Swiss francs-dollar conversion if you were traveling in Switzerland. A
currency converter stores the most recent market valuations of the world's currencies, which
allows individuals to compare the value of one currency against those of others in the
database. The values of the different currencies are determined based on the supply or
demand of dealing prices between international banks.

However, the rates that are quoted to retail customers at a bank may differ slightly from those
at which banks trade among themselves because banks make a small profit on the exchange
rate each time they buy or sell a currency. The rates shown on online rate converter tools
usually do not take this retail profit into account.

6
Requirements:

Operating System:
 Windows 7,windows 8 or windows 10.
 Mac OSX 10.8.

Hardware Requirements:

 Processor (CPU) with 2 gigahertz (GHz) frequency or above.

 A minimum of 2 GB of RAM.

 Monitor Resolution 1024 X 768 or higher.

 A minimum of 20 GB of available space on the hard disk.

 Internet Connection Broadband (high-speed) Internet connection with a speed of 4


Mbps or higher.

Software Requirements:

 Back End-My SQL.

 Internet Browser (Mozilla Firefox/Google Chrome).

 Front End-JSP, Servlet, Cloud.

 Front End Tool-Eclipse.

 Web server-Apache Tomcat 8.

Languages:

 Java, HTML, CSS, Servlet, JSP

7
Methodology:

Convert.java
import java.io.IOException;

import java.io.PrintWriter;

import javax.servlet.ServletException;

import javax.servlet.annotation.WebServlet;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

/**

* Servlet implementation class Convert

*/

@WebServlet("/Convert")

public class Convert extends HttpServlet {

private static final long serialVersionUID = 1L;

/**

* @see HttpServlet#HttpServlet()

*/

public Convert() {

super();

// TODO Auto-generated constructor stub

8
}

/** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse


response) */

protected void doGet(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {

// TODO Auto-generated method stub

response.getWriter().append("Served at: ").append(request.getContextPath());

/**

* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse


response)

*/

protected void doPost(HttpServletRequest request, HttpServletResponse response)


throws ServletException, IOException {

// TODO Auto-generated method stub

PrintWriter pw=response.getWriter();

response.setContentType("text/html");

String from=request.getParameter("from");

String to=request.getParameter("to");

String curr=(String)request.getParameter("amount");

double exchange=0.0d,res,currency;

currency=Double.parseDouble(curr);

switch(from)

case "USD":if(to.equals("INR"))

exchange=69.39d;

else if(to.equals("NZD"))
9
exchange=1.50d;

else if(to.equals("JPY"))

exchange=111.93d;

else if(to.equals("AUD"))

exchange=1.40d;

else if(to.equals("CAD"))

exchange=1.34d;

break;

case "INR":if(to.equals("USD"))

exchange=0.014d;

else if(to.equals("NZD"))

exchange=0.022d;

else if(to.equals("JPY"))

exchange=1.61d;

else if(to.equals("AUD"))

exchange=0.020d;

else if(to.equals("CAD"))

exchange=0.019d;

break;

case "NZD":if(to.equals("USD"))

exchange=0.67d;

else if(to.equals("INR"))

exchange=46.40d;

else if(to.equals("JPY"))

exchange=74.86d;

else if(to.equals("AUD"))

exchange=0.94d;

10
else if(to.equals("CAD"))

exchange=0.89d;

break;

case "JPY":if(to.equals("USD"))

exchange=0.0089d;

else if(to.equals("INR"))

exchange=0.62d;

else if(to.equals("NZD"))

exchange=0.013d;

else if(to.equals("AUD"))

exchange=0.012d;

else if(to.equals("CAD"))

exchange=0.012d;

break;

case "AUD":if(to.equals("USD"))

exchange=0.72d;

else if(to.equals("INR"))

exchange=49.64d;

else if(to.equals("NZD"))

exchange=1.07d;

else if(to.equals("JPY"))

exchange=80.05d;

else if(to.equals("CAD"))

exchange=0.96d;

break;

case "CAD":if(to.equals("USD"))

exchange=0.75d;

11
else if(to.equals("INR"))

exchange=51.89d;

else if(to.equals("NZD"))

exchange=1.12d;

else if(to.equals("JPY"))

exchange=83.70d;

else if(to.equals("AUD"))

exchange=1.05d;

break;

pw.println("<center>");

pw.println("Currency is:"+currency);

pw.println("Exchange is:"+exchange);

res=exchange*currency;

pw.println("Result of Currency is:"+res);

pw.println("</center");

doGet(request, response) } }

index.html:
<html>

<head>

<title>Currency</title>

</head>

<body bgcolor="pink">

<center>

<h1>CURRENCY CONVERTOR</h1>

<div id="currencyBox">

12
<form method="POST" action="Convert">

<div class="data">

<label for="from">Enter YOUR Currency Amount to Convert:</label>

<input type="text" name="amount" id="amount" />

</div>

<div class="data">

<label for="fromCurrency">From Currency:</label>

<select name="from" id="from">

<option value="USD" selected="">United States Dollars - USD</option>

<option value="CAD">Canada Dollars - CAD</option>

<option value="AUD">Australia Dollars - AUD</option>

<option value="JPY">Japan Yen - JPY</option>

<option value="INR">India Rupees - INR</option>

<option value="NZD">New Zealand Dollars - NZD</option>

</select>

</div>

<div class="data">

<label for="to">To Currency:</label>

<select name="to" id="to">

<option value="USD">United States Dollars - USD</option>

<option value="CAD">Canada Dollars - CAD</option>

<option value="AUD">Australia Dollars - AUD</option>

<option value="JPY">Japan Yen - JPY</option>

<option value="INR">India Rupees - INR</option>

<option value="NZD">New Zealand Dollars - NZD</option>

</select>

</div>

13
<div class="data">

<input type="submit" name="submit" id="submit" value="Convert the input">

</div>

</form> </div> </center> </body> </html>

14
Outputs:

Screen Shot 1: Homepage to enter currency amount and to convert the currency.

15
Screen Shot 2: Created a drop down list for all countries for selecting.

16
Screen Shot 3: Selecting from currency and to currency for currency conversion.

Screen Shot 4: Final output.

17
Conclusion:
Currency converter that the people are utilizing they will dependably discover approaches to
get the most astounding conceivable benefits out of the trades. To the individuals who are
going to travel it is an astute thing to check the unique outside trade choices they have
previously. Although foreign exchange may be confusing, in today’s global marketplace,
there is a critical need for almost everyone to understand foreign exchange like never before.
As the world shrinks, there is an ever-increasing likelihood that we will be required to
address the risks associated with the fact that there are different currencies used all around the
world and that these currencies will have an immediate impact on our world.

References:
 http://www.projectjugad.com/currency-converter-java-project/
 https://sourceforge.net/directory/os:windows/?q=java+currency+converter
 https://projectworlds.in/java-projects-with-source-code/currency-converter-java-mini-
project/

18

You might also like