I am in an Into to Java class and this is my last week. Up until now, I have been able to keep up to some degree by using the code in my book and altering it. However, for my final project, I have to do something that I am unable to locate any similar code for in the book...any help would be appreciated. Up to this point, the java assignments have only been writing Java applications in TextPad and running them. I have not even had any classes in HTML coding yet, I have had one class in QBasic and am comfortable with procedural programming, and one class in SQL. This is my first OOP class and I am really struggling trying to move from the the concept of procedural code to objects.
I am not wanting someone to write the code for me. I just would like some directions of what I need to do...like write an applet for something then a class for something else....whatever it is.
Write a Java servlet, HTML.Bank.java, that creates a HTML form that contains: A text box for entering an amount, a text field that displays a formatted balance, and three buttons ("Deposit" to add the amount to the balance, "Withdraw" to subtract the amount from the balance, and "Balance" to display the balance) Use an instance variable for the balance. If no amount is entered in the text box or if it is a zero or negative number, output a simple HTML page that displays an error message. Also, be sure that an amount was entered before converting the string variable for amount to a double.
I have to be able to run this on my Tomcat server with my web browser. I have no idea where to even start.
first things first, get apache tomcat installed, go to:
and set it up, if you have had no expereince with it before it can be quite a task to get it running. But there are instructions.
Once you have it running, there is usually a sample jsp file that tomcat will run. This could be a good place to start with your java coding
(JSP meaning, Java Server Page, basically HTML and JAVA incorporated together)
Also HTML is very easy to learn fast. You will be able to find many HTML tutorials around the net. I also know alot about HTML so give us a yell if need be.
A kram a day keeps the doctor......guessing
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center