本論文中提出一個視窗程式設計的新方法論,即是以有限狀態自動機作為複雜互動式視窗程式設計的模型,來簡化程式設計的複雜度,確保程式邏輯的正確性。將狀態轉換圖表示成表格方式的狀態轉換表以及行動表,使得程式設計易於了解,方便視窗程式的開發、除錯、與維護。文中並以利用滑鼠來繪製貝茲曲線為研究案例,探討如何利用有限狀態機來模擬事件驅動的視窗程式設計,使得互動式視窗程式設計的複雜度變得簡單,程式的邏輯正確性易於驗證,且程式碼易於了解與維護。 A new methodology for window programming is proposed in this paper. It models complex, interactive window programs as finite state machines. It attempts to simplify the complexity of program design and to ensure the correctness of program logic so that it is easy to understand the idea of program design and is convenient for program development, debugging, and maintenance. In addition, a case study on drawing Bezier curves using mouse is also employed to demonstrate the benefits of applying the proposed methodology for modeling the window program as a finite state machine in the program design process.
關聯:
陸軍官校八十週年校慶綜合學術研討會暨國科會國防科技航空技術學門研究成果發表會論文集=Proceedings of 2004 Fundamental Academic Conference of ROC Military Academy and Defense Science in Aviation Technology Symposium of National Science Council,14頁