a web application to function as a simple hand calculator that also keeps a paper trail of
Question:
a web application to function as a simple hand calculator that also keeps a "paper trail" of all your previous work.
Details:
Your program should consist of the following components:
An HTML page
This page is dynamically generated by JSP. It contains a trail of all the work you have done previously, for example something like this:
0.0 + 2.5 = 2.5 + 5.0 = 7.5 * 3.55 = 26.625 / -3.0 = -8.875 etc.
In addition, it should have the following HTML form elements: a text field in which you can enter numbers; add, subtract, multiply, and divide buttons; a clear button, to reset the current value to zero; and a clear all button, to reset the current value to zero and "erase" the paper trail (for when your page is getting too long and you want to start over).
Since the user should enter only numbers into the text field, use JavaScript to validate the numbers before you submit the form. (Hint: Google on "JavaScript validate input field.")
A servlet
The servlet should handle getting the request, calling some other class to do the work, and forwarding the result to JSP for formatting.
Along the way, the servlet should do session tracking, that is, it needs to keep track of the "paper trail" and the current value. I strongly recommend using the servlet tracking API, javax.servlet.http.HttpSession, as being the simplest and easiest way.
Auditing and Assurance services an integrated approach
ISBN: 978-0132575959
14th Edition
Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley