Sie sind auf Seite 1von 16

MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION MUMBAI
A
PROJECT REPORT ON
“CURRENCY CONVERTER USING
SERVLET”
UNDER THE GUIDANCE
OF
Mrs. P. P. Magdum

DEPARTMENT OF
COMPUTER ENGINEERING
DR. D.Y. PATIL POLYTECHNIC,
KASABA BAWADA, KOLHAPUR
SEMESTER – V
YEAR: - 2019-20
SUBMITTED BY: -
Name Roll No
Misbah Sharif Naik 3117

Sakshi Sachin Patil 3116

1
Certificate
This Is To Certify That Mr. /Ms.

Name Roll No
Misbah Sharif Naik 3117
Sakshi Sachin Patil 3116

of 5th Semester of Diploma in Computer Engineering Of

Institute, Dr. D. Y. Patil Polytechnic (Code: 0539) Has Completed the Micro

Project Satisfactorily In Subject – Advanced Java Programming for the


Academic Year 2019-2020 As Prescribed In the Curriculum.

Place: Kolhapur Date: 09-10-2019

Subject Teacher Head of the Department Principal

2
ACKNOWLEDGMENT
It is being a result of patients, hard work and mutual understanding it is our great pleasure to
represent this project on “CURRENCY CONVERTER USING SERVLET”

Everything needs some where to fall back upon sometimes. And we are not an exception. The
completion of this project is the result of immense, heartfelt advice and suggestions from various
people in various fields no matter how small they might seem to be.

We would first like to thank our guide MRS. P. P. MAGDUM without whom the completion of
this project would be nothing but a dream. Their suggestions, advice and wonderful ideas had never
failed to add some color to this project.

Explicitly speaking, each and every teacher in computer engineering department in dr. D. Y. Patil
polytechnic aided none way or another in turning this project in to a reality. Thought it may not be
possible to mention each one of them by name, we still like to thank the mall for their aids.

The patience, advice and encouragement of our classmates and our friends in general had
been too helpful to be neglected. Wondering what would happen without them. We heartily
like to express our gratitude to them too.

Well charity can also last at home sometimes. We would also like to thank one another in our
project group for this advice, hardworking patience and off course precious idea.

Date: 09-10-2019

Place: Kolhapur.

3
INDEX

TITLE PAGE NO

1 Introduction 5

2 Literature Review 6

3 Aim Of The Project 8

4 Course Outcomes Achieved 9

5 Actual Resources Used 10

6 Outputs Of The Micro Project 11

7 Skills Developed / Learning Out Of This Project 16

8 Applications Of This Project 16

4
Introduction

This project includes the Currency Conversion where the HTML code gives user
friendly GUI, through which user can interact with converter. In this user can enter value in
Rupees and while we click on the button “CONVERT”, we get converted currency values on
dynamic page ,which is created by using Servlet and all calculations are done here.
A currency converter is software code that is designed to convert one currency into another in
order to check its corresponding value. The code is generally a part of a web site or it forms a
mobile app and it is based on current market or bank exchange rates.
In order to convert one currency into another, a user enters an amount of money (e.g. '1000') and
chooses the currency he/she wishes to check the monetary value of (e.g. 'United States Dollar').
After that, the user selects one, or sometimes several other currencies, he/she would like to see
the result in. The application software then calculates and displays the corresponding amount of
money.
Currency converters aim to maintain real-time information on current market or bank exchange
rates, so that the calculated result changes whenever the value of either of the component
currencies does. They do so by connecting to a database of current currency exchange rates. The
frequency at which currency converters update the exchange rates they use varies: Yahoo
currency converter updates its rates every day, while Convert My Money< every hour.
Currency converters usually display a value that is not biased towards buying or selling. This is
useful when:
• Estimating the value of goods or services
• Basic accounting and invoicing
• Preparing financial plans and reports
The currency conversion software calculates the rates as decimal point numbers with typically 4
decimals after the comma. Some may calculate the conversion rates with more decimals
internally but only 4 are displayed. This is related to precision, software internalization (i18n)
and how the Forex (foreign exchange) market works, where most conversions have 4 decimal
places, although some currency pairs also have 5. Most currency converters use up to 4.

5
Literature Review

• What is Servlet?

We studied about Servlet for developing the currency converter. Servlet technology is
used to create a web application (resides at server side and generates a dynamic web page).
Servlet technology is robust and scalable because of java language. There are two types of servlet:1.
GenericServlet and 2. HttpServlet.

• What is HTTPServlet?

In this project HttpServlet is used. The HttpServlet class extends the GenericServlet
class and implements Serializable interface. It provides HTTP specific methods such as doGet,
doPost, doHead, doTrace etc.

• Methods are used to create Servlet?

public void service(ServletRequest req,ServletResponse res) dispatches the request


to the protected service method by converting the request and response object into http type.

• General Review:-
Viewed many existing convertors and values of another country currency for calculating
Rupees to Dollar, Euro ,Pounds and Rubal collecting the information about the project.
Searched on internet about the flow of procedure that we include in our program.

• Books:

Book Name: Complete Reference

Author: Schildt,Herbert

Publisher: Mcgraw Hill Education.

6
• Websites:

https://www.geeksforgeeks.org/introduction-java-servlets/

https://www.tutorialspoint.com/servlets/servlets-auto-refresh.htm

7
Aim of the micro project

The aim of is the project is to develop a system that converts currency in an


efficient and reliable way. Aim to maintain real-time information on current market or bank
exchange rates

• Develop Currency Convertor Using Servlet

8
Course Outcomes Achieved

Develop a program using Servlet.


• Program using GUI framework (AWT and Swing)
• Handle Events of AWT and Swing Components
• Events in Java Programming
• Program using File Handling
• Program using Database
• File Handling to Database and Vice Versa

9
Actual Resources Used

Sr.no. Name of Resource Specification Qty.

1. Hardware: Computer(i3-i5 Preferable), minimum 1


2GB RAM and onwards
Computer System

2. Operating System Windows 7 or Later Version 1

3. Software • Notepad 1
• JDK setup
• Apache Tomcat9

10
Program Code

1. HTML CODE:

<!DOCTYPE html>

<html>

<head>

<title>Currency Convertor </title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>

<body>

<h1>Wel-come To Currency Converter</h1>

<form name='f1' action='http://localhost:8085/sru/Dollar' method='get'>

Enter values in Rupees: <input type='text' name='t1'>

<br>

<br>

<input type='submit' name='submit' value='Convert'>

</form>

</body>

</html>

11
2. Java HttpSevlet Program:

import javax.servlet.http.*;

import javax.servlet.*;

import java.io.*;

public class Dollar extends HttpServlet

public void doGet(HttpServletRequest req,HttpServletResponse res)throws


IOException,ServletException

PrintWriter pr=res.getWriter();

res.setContentType("text/html");

try

int x=Integer.parseInt(req.getParameter("t1"));

pr.println("The Dollar value is = "+ (x/70.83));

pr.println("<br>");

pr.println("The Euro value is ="+(x/77.76));

pr.println("<br>");

pr.println("The Ruble value is ="+(x/1.10));

12
pr.println("<br>");

pr.println("The Pound value is ="+(x/87.32));

catch(Exception e)

pr.println("Invalid Input");

3. XML code:

<web-app>

<servlet>

<servlet-name>Dollar</servlet-name>

<servlet-class>Dollar</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>Dollar</servlet-name>

<url-pattern>/Dollar</url-pattern>

</servlet-mapping>

</web-app>

13
Output of The Micro Project

14
15
Skills Developed/Learning out of this Project

• Program using GUI framework (AWT and Swing)


• Handle Events of AWT and Swing Components
• Events in Java Programming
• Program using File Handling
• Program using Database
• File Handling to Database and Vice Versa

Application Of This Project

• currency conversion in the shopping cart

• user friendly

• less human resource required

• provides security

• A currency converter is also very crucial to help users

• Easy method for user to convert currency

• Processing the conversion requests.

16

Das könnte Ihnen auch gefallen