程式語言 (Principles of Programming Languages)
2009
教師: 江振瑞 (jrjiang_a_t_csie.ncu.edu.tw)
助教: 葉政峰 洪兆緯 林子浩
繳交作業:975202005_a_t_cc.ncu.edu.tw
Blackborad System: http://bb.ncu.edu.tw
(程式語言A)
上課時間:Tuesday 15:00~17:50
上課地點:E6-A204
軟體下載:
相關聯結:
授課大綱:
2/24: Preclass Test and Course Introduction
3/3:
3/10:
- Liang's chapter 2: Elementary Programming
- Homework 3: Exercise 2.12 (Finalcial application: calculating
interests) on page 92. Due: 3/12 Midnight (Sent by e-mail)
3/17:
3/24:
- Liang's chapter 4: Loops
- Homework 6: Use JOptionPane.showInputDialog method to input an
interger n less than 2147483648 and use JOptionPane.showMessageDialog
method to show the largest prime no larger than n. You must use the "continue" statement
with label; otherwise, the program is considered no good. Due:
3/27 before TA class (Hand in a hand-written copy on 3/27 before TA
class)
- Homework 7: Use JOptionPane.showInputDialog method to input two
intergers n and m, both less than 2147483648, calculate their greatest
common divisor (gcd) by the Euclidean algorithm, and use
JOptionPane.showMessageDialog method to show the gcd. Due: 3/27 before
TA class (Hand in a hand-written copy on 3/27 before TA class)
- Introduction to MMOG/MMORPG (ppt)
3/31:
- LAGER 校園授權 Server SDK 介紹 (3:00PM-4:00PM
at A206 classroom) Be on time!!
- The concept of algorithms and time complexity analysis (text)(ppt)
- Homework 8: Use JOptionPane.showInputDialog method to input an
interger n less than 2147483648 and use JOptionPane.showMessageDialog
method to show the summation of all divisors of n. Note that you should also print out the
time spent in executing your program. Due: 4/6 midnight (Sent by
Email)
4/07:
- Liang's chapter 5: Methods
- Liang's chapter 6: Arrays
- Homework 9: Exercise 5.31 (Hand in by FTP by 4/13 midnight)
- Homework 10: Exercise 6.35 (Hand in by FTP by 4/13 midnight)
- 4/10:TA class: Introduction to
VAST
4/14: (How to create and use objects)
- Liang's chapter 7: UML (chapter 7:slides 1 to 36) (chapter 10:
slides 1 to 4)
- Liang's chapter 8: String (chapter 8: slides 1 to 32)
- Jiang's chapter 6: Classes and Objects (pdf)(ppt)
- Homework 11: Exercise 9.4 and 10.1 (Hand in by FTP by 4/27
midnight)
- Homework 12: Jiang's Exercise 6-10 (Hand in by FTP by 4/27
midnight)
4/21:
Midterm
Exam. (for all materials taught beofore 4/21)
4/28: (How to take advantage of
inheritance)
- Liang's chapter 17: Applets and Multimedia (slides 1 to 18)
- Jiang's chapter 2: Applets (pdf)(ppt)
- Jiang's chapter 8: Multimedia (pdf)(ppt)
- Homework 13: Write a Java applet to
enable users to input a number n between 10 and 100, and a number s to
select to draw a filled circle (s=0), line (s=1), diamond (s=2),
triangle (s=3), square (s=4), pentagon (s=5) or hexagon (s=6) with side
length n (or radius n or length n) with a color randomly choosen from
seven colors of the rainbow, and centered in the applet painting area.
(Hand in by FTP by 5/4 midnight)
5/5: (How to create GUIs and handle
events)
- Liang's chapter 13: The Java GUI API (slides 1-7, 13-26)
- Liang's chapter 15: Event-driven programming (slides 1-14, 15-36
for showing the execution of sample programs only)
- Jiang's chapter 9: GUIs (pdf) (ppt)
- Jiang's chapter 10: Events (pdf)
(ppt)
- Homework 14: Write a Java Applet, a
Frame or a JFrame to simulate a calculator. (Hand in by FTP by 5/11
midnight)
5/12: (How to create network
connections)
5/26: (How to create a web server)
Homework 16b:利用Java語言,
寫一個SSL
Web Server,而其首頁則是要求使用者填入信用卡卡號的表單。
- (Hand in via FTP by 6/1 midnight)
6/2: (How to send/receive mails)
6/9: (New features of Java language)
- Jiang's book Java1.5新特性 (JavaE.ppt) (pdf)
- Liang's book Chapter 21 (slides 1-6, 8-11)
- Liang's book Chapter 6 (slides 32, 38-39)
Homework 17a: Write a
Java
application for users to use static import to input a sequence of
charatcters from standard
input (System.in) for checking if it has balanced brackets like { [ (
< > ) ] }. If so, output "Balanced Brackets!!"; otherwise, output
"Unbalanced Brackets!!". You
are confined to use Stack class, which implements Collection interface,
with
the concepts of generics, auto-boxing and auto-unboxing to push in or
pop
out a character for the checking. (Hand in
via FTP by 6/18 midnight)
Homework 17b: Exercise 24.8 (Postfix
expression evaluation) (Hand in via FTP by 6/18 midnight)
Hint: Refer to "Java?
Platform, Standard
Edition 6 API Specification" for the usage of Stack class.
6/16: Final Exam. (2 hours)
Java
語言進階 (for term project usage)
教科書:
- Y. Daniel Liang, "Introduction to Java Programming," 7th Edition,
2009.
參考書:
- 中文Java程
式設計, 江振瑞 著, 儒林出版社
- 物件導向資料結構
— 使用Java語言, 江振瑞 著, 松崗圖書公司
- Deitel and Deitel, "Java How to Program," 7/e, Pearson Education,
2008.
- Robert W. Sebesta, "Concepts of Programming Languages," 7/e,
Pearson Education, 2005.
- Steven S. Skiena and Miguel Revilla, "Programming Challenges,"
Elsevier, 2003.
- Java2程式設計入門與應用, 吳權威、王曉慧 編著, 網奕資訊 出版
- 精彩Java2程式設計, 吳逸賢、吳目誠 編著, 網奕資訊 出版
- 精彩JavaScript程式設計, 吳逸賢、王曉慧 編著, 網奕資訊 出版
- Java網際網路程式設計, 黃嘉輝 著, 文魁出版社
- JSP動態網頁入門實務, 位元文化 編著, 文魁出版社
- Java網路程式設計, 顏春煌 編著, 旗標出版社
評分方式:
其他相關鏈結: