Functional testing
Unit test, Module test
Conformance, sometimes we call "Interoperability"
Large volume testing
Capacity test, estimate the maximum volume of the DUT
Stress test, place the DUT in the high-pressure environment for a long period
Stability, place the DUT in the continuous great change environment
This area is my sharing area. Include some technical/believing/life experiences. Hope you can enjoy with me. God bless you. :)
2010年8月25日 星期三
2010年6月10日 星期四
Unified Modeling Language (UML)
The de factor standard of Software Enginering - Unified Modeling Language (UML)
http://www.sparxsystems.com.au/resources/uml2_tutorial/
http://www.cnblogs.com/oomusou/archive/2007/02/20/652899.html
首先看association,下圖是個典型的 assoication class diagram。
association的表示法是實線加上箭 頭,有兩個重點,navigability和multiplicity,navigability就是箭頭指的方向,指別的class的,表示負責維護 association關係,在此class中有data member存著被指class的reference(pointer),multiplicity則是上面的數字,離自己class比較遠的,表示對方 class和自己class之間的關係,如上圖,1個School可以有多個Student,而1個Student只能有一個School,而一個 Student可以選1到6個Course,1個Course可被1到多個Student選。
association常見的問題是,到底 箭頭該怎麼指才對?一般來說,若是一對多的關係,是由一指向多,因為通堂一個class會有個array或vector儲存多個物件,但這並非絕對,只能 說通常如此,如上圖的Student對Course是一對多,且Course對Student也是一對多,但他選擇了由Course負責 association關係,所以完全看設計需要,實務上,建議如UML for Java Programmer中文版p.3-15那樣,加上stereotype,詳細的敘述是屬於哪一種association,將來我會再專文介紹。
若 以C++表示,association的程式碼如下
再 來看aggregation
aggregation的表示法由空diamond和箭頭 表示(選的這張圖是比較舊的UML格式,所以沒有箭頭),空diamond表示whole,箭頭表示part。若以英文表示,就是has a的關係,上圖是典型一對多的表示法。
若以C++表示,aggregation的程式碼如下
最 後是composition,表示法與aggregation的差異在於變成實diamond,其他完全一樣,跟aggregation在意義的差異在於 composition強調『同生共死』,當System物件死亡時,Component物件也要跟著死亡,但aggregation是『生死有命』,當 System物件死亡時,Component物件並不特別去處理。
若以C++表示,composition的程式碼如下
由 以上程式可知,composition須由destructor去處理,而aggregation則不必。
在C#、Java這類有 garbage collection的語言,composition幾乎不會用到,但在C++,只要用到pointer,就得自己去delete,所以在 composition對於C++就很重要。
UML keywords
alt ==> if else
opt ==> switch case
loop ==> for/while loop
http://www.sparxsystems.com.au/resources/uml2_tutorial/
http://www.cnblogs.com/oomusou/archive/2007/02/20/652899.html
(原 創) association,aggregation,composition有什麼差別? (OO) (UML) (C/C++)
class之間有三種關係,inheritance,implementation和association。inheritance和 implementation在C++、C#、Java都有直接支援,所以不難懂,但association,aggregation和 composition在語言並沒有知接支援,到底三者有什麼差別呢?首先看association,下圖是個典型的 assoication class diagram。
association的表示法是實線加上箭 頭,有兩個重點,navigability和multiplicity,navigability就是箭頭指的方向,指別的class的,表示負責維護 association關係,在此class中有data member存著被指class的reference(pointer),multiplicity則是上面的數字,離自己class比較遠的,表示對方 class和自己class之間的關係,如上圖,1個School可以有多個Student,而1個Student只能有一個School,而一個 Student可以選1到6個Course,1個Course可被1到多個Student選。
association常見的問題是,到底 箭頭該怎麼指才對?一般來說,若是一對多的關係,是由一指向多,因為通堂一個class會有個array或vector儲存多個物件,但這並非絕對,只能 說通常如此,如上圖的Student對Course是一對多,且Course對Student也是一對多,但他選擇了由Course負責 association關係,所以完全看設計需要,實務上,建議如UML for Java Programmer中文版p.3-15那樣,加上stereotype,詳細的敘述是屬於哪一種association,將來我會再專文介紹。
若 以C++表示,association的程式碼如下
1
class A
{
2
private:
3
B* itsB;
4
};
2
3
4
再 來看aggregation
aggregation的表示法由空diamond和箭頭 表示(選的這張圖是比較舊的UML格式,所以沒有箭頭),空diamond表示whole,箭頭表示part。若以英文表示,就是has a的關係,上圖是典型一對多的表示法。
若以C++表示,aggregation的程式碼如下
1
class Node
{
2
private:
3
vector<Node*> itsNodes;
4
};
2
3
4
最 後是composition,表示法與aggregation的差異在於變成實diamond,其他完全一樣,跟aggregation在意義的差異在於 composition強調『同生共死』,當System物件死亡時,Component物件也要跟著死亡,但aggregation是『生死有命』,當 System物件死亡時,Component物件並不特別去處理。
若以C++表示,composition的程式碼如下
1
class Car
{
2
public:
3
virtual ~Car()
{delete itsCarb;}
4
private:
5
Carburetor* itsCarb
6
};
2
3
4
5
6
由 以上程式可知,composition須由destructor去處理,而aggregation則不必。
在C#、Java這類有 garbage collection的語言,composition幾乎不會用到,但在C++,只要用到pointer,就得自己去delete,所以在 composition對於C++就很重要。
UML keywords
alt ==> if else
opt ==> switch case
loop ==> for/while loop
2010年1月26日 星期二
軟體開發流程
1. Propose the proposal via ppt
2. Write down the SDS (System Development Specification)
3. Write down the SMD (System Module Document), SMD will include the pseudo code
4. implementation
5. Debug
How to write a well ppt
* Add legend for each diagram.
* Add sequence number to label the time sequence of each event as possible as we can.
* Avoid the diagram too complex. Delete the duplicate icon or label.
* Each word at least "18" word size (Chinese Word must at least "20" word size)
2. Write down the SDS (System Development Specification)
3. Write down the SMD (System Module Document), SMD will include the pseudo code
4. implementation
5. Debug
How to write a well ppt
* Add legend for each diagram.
* Add sequence number to label the time sequence of each event as possible as we can.
* Avoid the diagram too complex. Delete the duplicate icon or label.
* Each word at least "18" word size (Chinese Word must at least "20" word size)
訂閱:
文章 (Atom)