1 / 20

高等程式語言實習課

高等程式語言實習課. 程式設計能力上機考. 5/23( 星期六 ). 程式設計能力加強班. 時間 ( 3/23~6/12) http://www2.tku.edu.tw/~teix/CSIE/index.php?option=com_content&task=view&id=130&Itemid=68. 可以找到助教的時間. 程式設計加強班 (3/23~6/12) 每週二 13:30~15:00 B238 每週二 17:30~19:00 B232 機房時間 每週三 13:00~15:00 B201 高等程式設計 實習課. 程式設計技能樹. 物件導向程式.

hedda
Télécharger la présentation

高等程式語言實習課

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 高等程式語言實習課

  2. 程式設計能力上機考 • 5/23(星期六)

  3. 程式設計能力加強班 • 時間(3/23~6/12) • http://www2.tku.edu.tw/~teix/CSIE/index.php?option=com_content&task=view&id=130&Itemid=68

  4. 可以找到助教的時間 • 程式設計加強班(3/23~6/12) • 每週二 13:30~15:00 B238 • 每週二 17:30~19:00 B232 • 機房時間 • 每週三 13:00~15:00 B201 • 高等程式設計 實習課

  5. 程式設計技能樹 物件導向程式 類別 繼承 多型 封裝 超載 成員變數、成員函數 程式設計基礎 函數 結構 條件 迴圈 陣列

  6. 回想老鼠走迷宮 #include<iostream>using namespace std;int sx,sy;int ex,ey;int s;...void main(){ ...}

  7. 回想老鼠走迷宮 如果這樣寫... #include<iostream>using namespace std;class mouse{ int sx,sy; int ex,ey; int s; ... run();}; void main(){ mouse m; m.run();}

  8. 關於JAVA • What is Java? • 爪哇 地名? • 咖啡 能吃嗎? • 這是一種高階程式語言,同時也是一種執行平台

  9. 關於JAVA • Java是一種物件導向程式語言,在90年代初期由昇陽公司(Sun Inc.)的James Gosling與同事們一起共同發展,並對外發表 • 對於熟悉C++的程式設計師而言,學習Java並不困難,Java相較於C++容易,解除了許多程式設計師的惡夢

  10. 關於JAVA • C語言家族 • C、C++、Java 、Java script 、JSP • Java程式的編譯與執行 • 撰寫程式碼Source Codes產生.java檔 • 編譯後產生.class檔 • 何來 javac.exe ? • Hello.cpp=>Hello.obj=>Hollo.exe • Hello.java=>Hello.class

  11. 關於JAVA • Java的工作平台 • 提供java的執行環境 • JVM(java virtual machine) 這是軟體!!! JVM Java程式.class OS

  12. 關於JAVA • Java的跨平台執行 • 優點也是缺點... • 不同的OS有不同的JVM去解繹 • 因此Java流行使用在網路及手機上

  13. 關於JAVA • Java的跨平台執行 • 優點也是缺點... • 不同的OS有不同的JVM去解繹 • 因此Java流行使用在網路及手機上

  14. 關於JAVA • Java對程式設計師的幫助 • 容易上手,Java沒有指標,不需要解構子 • 較少的程式碼!? • 較佳的程式碼!? • 程式開發快速... • 跨平台,寫一次到處執行 • 散佈容易

  15. 安裝JDK • Java2 SDK • http://java.sun.com • Java專用IDE • http://www.netbeans.org

  16. BetBean畫面

  17. 期中考複習 • 類別 • 建構子 • 解構子 • 成員變數、成員函式 • 繼承

  18. 期中考複習 • 萬年考題 • 請寫出以下程式執行時物件的生成與消滅順序 void fun1() { xstr s1; } void fun2(xstr s3) {} xstr fun3() { xstr s4; retrun s4;} void main(){ xstr s; fun1(); fun2(); s = fun3(); }

  19. 期中考複習 • 萬年考題 • 請寫出輸出結果 class A{public: A(){ cout << “A”; } ~A(){ cout << “~A”; }};class B : public A{public: B(){ cout << “B”; } ~B(){ cout << “~B”; }}; int main(){ B* x=new B; delete x; system("pause"); return 0;}

  20. 祝考試順利~~~

More Related