2009年7月25日 星期六

Assignment 4-2

Today’s class was to continue the topic “Web Technologies”. I would like to start with the assignment “Java Bank”. The basic function demands are:
1. A dynamic webpage which can input an amount to deposit or withdraw from this account and show balance after processing.
2. The default value of deposit/withdraw amount is 0 while the starting balance is 1000 (see Figure 1).
For enhancing its functions, the class set 2 conditions: (1) the deposit amount must less than 1000000, and (2) the withdraw amount must less than or equal to the balance. I personally added the third condition: the withdraw amount must less than or equal to 30000. The program won’t execute if the input does not satisfy these conditions (see Figure 7). The input function works fine but I have problems finding the correct syntax to show error messages when the input amount is out of the range.

Dr. Chen has mentioned that API is an important tool for programmers. I have heard “API” but I don’t know what the implication of API is. After searching the Internet, I know now that “API” stands for Application Programming Interface in computer science. API defines how an application program may request services from libraries or operating systems, including vocabulary, calling conventions, and communication specifications for data structures, object classes, protocols, etc. Any software that provides the functionality described by an API is said to be an implementation of the API.

For the final project, in my preliminary sketch, I planned to include few functions of the application “Java Bank.” There will be several sub-accounts under the main account. The user can choose which account he/she wants to interact with when inputting amount to process deposit or withdraw. Also the application will show error message to remind users what contravenes the default settings and how users should do to correct the errors. I will continue to modify the schema of my project according to what I learn from this course.

Finally, I would like to appreciate Dr. Chen’s kind inspiration to me. Thanks.


References

1. http://en.wikipedia.org/wiki/Application_programming_interface

沒有留言:

張貼留言