Ooad uml
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

OOAD & UML 範例 — 三國演義 PowerPoint PPT Presentation


  • 55 Views
  • Uploaded on
  • Presentation posted in: General

OOAD & UML 範例 — 三國演義. 類別的 Java 版. 劉備 class 劉備 { 孔明 k = new 孔明 (); 關羽 g = new 關羽 (); void 迎戰曹操 () { k. 擬定戰略 (); g. 防守荊州 (); k. 聯合孫權 (); } }. 孔明 class 孔明 { 孫權 s = new 孫權 (); void 擬定戰略 () { } void 聯合孫權 () { s. 請領兵相助 ();

Download Presentation

OOAD & UML 範例 — 三國演義

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Ooad uml

OOAD & UML 範例 — 三國演義


Ooad uml

類別的Java版

  • 劉備

    class 劉備 {

    孔明 k = new 孔明();

    關羽 g = new 關羽();

    void 迎戰曹操() {

    k.擬定戰略();

    g.防守荊州();

    k.聯合孫權();

    }

    }

  • 孔明

    class 孔明{

    孫權 s = new 孫權();

    void 擬定戰略() { }

    void 聯合孫權() {

    s.請領兵相助();

    s.借東風火攻();

    }

    void 借東風火攻(){ }

    }


Ooad uml

類別的Java版(續)

  • 關羽

    class 關羽 {

    張飛 j = new 張飛();

    void 防守荊州() {

    j.防守荊州前線();

    }

    }

  • 張飛

    class 張飛{

    void 防守荊州前線() { }

    }


  • Login