0% found this document useful (0 votes)
15 views13 pages

Laravel Currency Converter Project

Uploaded by

rohinikadave0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views13 pages

Laravel Currency Converter Project

Uploaded by

rohinikadave0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.

1
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.

2
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

3
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

4
Actual Resources Used

[Link]. 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
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='[Link] method='get'>

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

<br>

<br>

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

</form>

</body>

</html>
2. Java HttpSevlet Program:

import [Link].*;

import [Link].*;

import [Link].*;

public class Dollar extends HttpServlet

public void doGet(HttpServletRequest req,HttpServletResponse res)throws


IOException,ServletException

PrintWriter pr=[Link]();

[Link]("text/html");

try

int x=[Link]([Link]("t1"));

[Link]("The Dollar value is = "+ (x/70.83));

[Link]("<br>");

[Link]("The Euro value is

="+(x/77.76)); [Link]("<br>");

[Link]("The Ruble value is ="+(x/1.10));


[Link]("<br>");

[Link]("The Pound value is ="+(x/87.32));

catch(Exception e)

[Link]("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>
Output of The Micro Project
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.
References:

 Websites:

[Link]

[Link]

Common questions

Powered by AI

Displaying currency values with four decimal places is a common practice in financial computations and Forex markets to ensure a reasonable level of precision, without overloading the user with excessive detail. This level of precision reflects real-world practices where exchange rates typically include four to five decimal places for accuracy in transactions and accounting. The choice maintains consistency with market norms, facilitating accurate and useful conversions for financial applications .

The currency converter application consists of a user-friendly GUI developed using HTML that allows users to input currency amounts in Rupees. The conversion is executed on a dynamic page using a Servlet written in Java, which computes the converted currency values based on exchange rates. These exchange rates are derived from a database of current rates, ensuring that the application maintains real-time information, crucial for accurate conversion. This setup allows users to select their desired currency to view the conversion, updating the displayed value as exchange rates change .

The currency converter application can streamline basic accounting and invoicing processes by allowing users to quickly and accurately convert currency values as needed. This reduces manual errors and saves time in calculating the equivalent amounts required for transactions or financial reporting. By accessing real-time exchange rates and providing accurate conversions, the application supports more efficient financial planning and resource allocation .

The service method in the HttpServlet class is responsible for processing incoming HTTP requests and dispatching them to the appropriate handler methods (like doGet or doPost). In the currency converter application, the service method reads the user's input from the HTML form and computes the conversion by utilizing the current exchange rates. It converts the incoming request and response objects into HTTP types to execute this operation, thereby ensuring that each request can be processed to yield the correct currency equivalents dynamically .

Integrating file handling and database programming into the currency converter enhances its functionality by enabling persistent data management and efficient exchange rate updates. File handling can allow the storage and retrieval of user preferences or transaction histories, while databases can provide a structured way to store and update currency rates. This ensures that the application can be both responsive to market changes and adaptive to user storage needs, supporting dynamic and large-scale operations .

Servlet technology is key to the functionality and robustness of the currency converter application as it enables the creation of dynamic web pages that can interact efficiently with user inputs. The use of Java makes the application both robust and scalable, leveraging Java's object-oriented features and extensive libraries. HttpServlet, a specific type of Servlet used in the project, supports HTTP-specific protocols, thereby handling GET and POST requests efficiently, which are crucial for converting currency on-the-fly .

Students undertaking the micro-project on currency conversion using Servlets gain practical experience in web development and server-side programming. They learn to handle HTTP requests and develop dynamic web applications, gaining proficiency in using Java for real-world applications. Skills developed include implementing GUI frameworks, handling events in Java, and integrating file and database management. These outcomes prepare students for more advanced programming tasks and enhance problem-solving skills in dynamic internet applications .

The HTML form in the currency converter facilitates user interaction by providing a straightforward interface for inputting currency amounts and initiating the conversion process. Its design is crucial as it must be intuitive, responsive, and accessible, ensuring users can easily perform conversions with minimal effort. The form structure, including input fields and submit buttons, must align with the backend servlet functionality to ensure seamless data processing and conversion execution .

Using a GUI framework like AWT or Swing for the currency converter application provides several benefits, including improved user interaction through a visually intuitive interface. These frameworks offer built-in components for building responsive interfaces, allowing users to enter data and receive dynamic results without needing deep technical knowledge. Technically, these frameworks support event-driven programming, which is essential for handling user actions (like button clicks) promptly and efficiently, directly embedding the GUI with backend processing .

Developers face challenges in updating exchange rates in real-time, such as ensuring network reliability, managing database queries efficiently, and minimizing latency. To address these issues, they may need to implement a robust data synchronization system and optimize server communications. Concurrent request handling and data caching can be used to reduce strain on the database. Additionally, implementing secure, high-frequency APIs for fetching exchange rates could mitigate potential lags and increase reliability .

You might also like