-
大小: 30.81MB文件類型: .rar金幣: 1下載: 0 次發布日期: 2023-07-23
- 語言: 其他
- 標簽: shejimoshi??
資源簡介
軟件設計模式實訓教程的ppt+類圖+代碼,里面包括創建型設計模式、結構型設計模式和行為型設計模式中所包含的所有設計模式的詳細ppt、代碼與類圖。
代碼片段和文件信息
class?Rectangle?
{
????private?double?width;
????private?double?height;
????public?Rectangle(double?widthdouble?height)
????{
????????this.width=width;
????????this.height=height;
????}????
????public?double?getHeight()?
????{
????????return?height;
????}
????public?void?setHeight(double?height)?
????{
????????this.height?=?height;
????}
????public?double?getWidth()
????{
????????return?width;
????}
????public?void?setWidth(double?width)?
????{
????????this.width?=?width;
????}
}
class?Square?extends?Rectangle
{
public?Square(double?size)
{
super(sizesize);
}
????public?void?setHeight(double?height)?
????{
????????super.setHeight(height);
????????super.setWidth(height);
????}
????public?void?setWidth(double?width)?
????{
????????super.setHeight(width);
????????super.setWidth(width);
????}
}
class?Client
{
public?static?void?main(String?args[])
{
Rectangle?r;
r?=?new?Square(0.0);
r.setWidth(5.0);
r.setWidth(10.00);
double?area?=?calculateArea(r);
if(50.00==area)
{
System.out.println(“這是長方形或長方形的子類!“);
}
else
{
System.out.println(“這不是長方形!“);
}
}
public?static?double?calculateArea(Rectangle?r)
????{
???? return?r.getHeight()?*?r.getWidth();
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1373696??2012-02-17?14:36??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第10章_適配器模式.ppt
?????文件????1117696??2012-02-17?14:37??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第11章_橋接模式.ppt
?????文件????1278976??2012-02-17?14:38??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第12章_組合模式.ppt
?????文件????1359360??2012-02-17?14:38??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第13章_裝飾模式.ppt
?????文件????1169920??2012-02-17?14:38??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第14章_外觀模式.ppt
?????文件????1448960??2012-02-17?14:38??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第15章_享元模式.ppt
?????文件????1357824??2012-02-17?14:38??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第16章_代理模式.ppt
?????文件????1080320??2012-02-17?14:39??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第17章_職責鏈模式.ppt
?????文件?????936448??2012-02-17?14:29??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第18章_命令模式.ppt
?????文件????1180160??2012-02-17?14:30??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第19章_解釋器模式.ppt
?????文件????4289536??2012-02-17?14:33??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第1章_統一建模語言基礎知識.ppt
?????文件????1157632??2012-02-17?14:30??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第20章_迭代器模式.ppt
?????文件????1315328??2012-02-17?14:30??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第21章_中介者模式.ppt
?????文件????1101312??2012-02-17?14:31??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第22章_備忘錄模式.ppt
?????文件????1226240??2012-02-17?14:31??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第23章_觀察者模式.ppt
?????文件????1387008??2012-02-17?14:32??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第24章_狀態模式.ppt
?????文件?????744448??2012-02-17?14:27??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第25章_策略模式.ppt
?????文件?????787968??2012-02-17?14:32??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第26章_模板方法模式.ppt
?????文件????2362880??2012-02-17?14:33??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第27章_訪問者模式.ppt
?????文件????4852736??2012-02-17?14:33??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第2章_面向對象設計原則.ppt
?????文件????4145664??2012-02-17?14:33??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第3章_設計模式概述.ppt
?????文件????3355136??2012-02-17?14:34??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第4章_簡單工廠模式.ppt
?????文件????1211904??2012-02-17?14:34??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第5章_工廠方法模式.ppt
?????文件????1156608??2012-02-17?14:35??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第6章_抽象工廠模式.ppt
?????文件????1166336??2012-02-17?14:35??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第7章_建造者模式.ppt
?????文件????1245184??2012-02-17?14:35??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第8章_原型模式.ppt
?????文件?????714240??2012-02-17?14:36??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\第9章_單例模式.ppt
?????文件????1429450??2012-02-17?14:34??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\PPT\設計模式實訓教程-前言及目錄.pdf
?????文件????2531107??2012-12-05?20:56??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\第3章創建型模式實訓(樣章).pdf
?????文件???????1298??2011-03-14?09:21??《設計模式實訓教程》【PPT+類圖與代碼+樣章】\類圖與代碼\《設計模式實訓教程》代碼\第2章代碼\綜合題(2)-代碼.java
............此處省略101個文件信息
評論
共有 條評論