question archive Your assignment is to implement a simple web service which lets users convert an amount from one currency to another, for example from USD to EUR

Your assignment is to implement a simple web service which lets users convert an amount from one currency to another, for example from USD to EUR

Subject:Computer SciencePrice:2.87 Bought7

Your assignment is to implement a simple web service which lets users convert an amount from one currency to another, for example from USD to EUR. The interface should consist of two text fields, “Amount” and “Rate,” and a submit button, “Convert!” If you want to convert an amount from one currency to another, we input the amount in the “Amount” text field and press the “Convert!” button. The service should reply with a new web page, which displays the result of the conversion.

OPTIONAL FEATURES: The service should remember which exchange rate is being used for conversion, initially 1.0. If the user wants to change the exchange rate he inputs a new rate in the “Rate” text field and the amount to be converted in the “Amount” field. The new rate should be remembered for future conversion when the “Rate” field is left empty.

  1. Write your servlet in a file named Converter.java.
  2. You should implement the doGet method OR the doPost method.
  3. In this method, write code, which produces an HTML-page. Let the “action” attribute of the <form> tag have the value “/converter/servlet/Converter”, pointing out the servlet you are implementing. Let the “method” attribute have the value “post”.
  4. In your method, write code, which retrieves the values, entered into the text fields of the HTML form. Process the information accordingly and produce a suitable HTML page as a reply.
  5. Use an attribute in the Converter class to store the current exchange rate.
  6. Compile and test your servlet!

Option 1

Low Cost Option
Download this past answer in few clicks

2.87 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 7 times

Completion Status 100%