2008年11月28日 星期五

Lab Overloading

Do Display 4.11


Lab ADT

Define a Complex class and write an object oriented program to compute (2+3i)+(4+5i) in Java.
The methods should include an access and a mutator.






2008年11月24日 星期一

Lab: Form and Action, Part II

Hand code a HTML or use Nvu to edit an HTML so that the webpage can send a request to Google like http://maps.google.com/maps?q=24.9586,+121.24114 Use Form CGI that includes action, input, and submit. Try a few different coordinates.













Lab Checking dead links

W3C Link Check 可以檢查 dead links, 而且只要輸入首頁, 就可以依據指定深度自動向下檢查, 而且也可以檢查對外連結(外站). Link Checker 首先要設定檢查深度(Check linked documents recursively, recursion depth=?), 如果沒有設定, 它就只有檢查首頁. 因此如果出現 deadlink, 就是在首頁. 如果你設定檢查深度, 它就會逐一檢查此深度內的每一頁, 在檢查某一頁開始時, 它會先顯示現正在檢查的 URL, 然後 在逐一爬行該頁內每個 link. 報表輸出很漂亮. 請參閱 http://validator.w3.org/checklink 請檢查三個你最常使用的網站, 看看連結的品質如何? 紀錄有錯誤連結 (HTTP Error 404) 的次數.












Lab: Form and Action

"logic will get you from A to B - imagination will take you anywhere"

How to use Form to invoke a remote service through CGI.

1. Copy the search box of this search page,
inlcuding radio buttons, text input, and submit button.
2. Open your Nvu HTML editor.
3. Open a new empty HTML file.
4. Paste the search box into this new file.

5. Use Nvu to add a Form to this search box. Do not hand code the HTML. Just fill the blank in the Form dialog.

6. In the form dialog, set Action="http://google.com/search" and name of Form as "f" and method as "get"
(See Hint if it does not work.)
7. Save your file on your computer. Run your HTML by Firefox. What do you get?

8. Set method as "post"
9. Run your HTML by Firefox. What do you get?













Homework 11-17-2008

1. Lab Making web pages accessible
2. What is Web 2.0?
3. What is mashup?

answer
1.很抱歉,我不會> <

2.
Web 2.0,他是一個新生的術語,大致上跟Web1.0的基本功能一樣,唯一改變的是他是可以透過分享,讓更多
人享受這些資源,這可說是網路的一大創舉。

3.所謂的mashup,就是混搭。整合網路上的一些資源,結合成一個新的服務,例如一個網站,可以由很多的網址或圖片穿插而成。

2008年11月21日 星期五

lab Fraction Addition

Write a program to implement a method that can do additions of 2 fractions. You will implement a class called Fraction consisting of a numerator and a denominator. The additions of
2 fractions should be equal to a fraction.
Use 1/2+1/3 as the test.

Hints:
Fraction f1, f2;
f1.add(f2);