「子由數學小學堂」為針對國小數學所設計的學習網站,其採用自動化出題程式產生題目以供老師、家長、學生等使用者取用,自動化出題程式包含數學計算題及文字應用題,本論文之主旨在於重構文字應用題自動出題程式,解決舊有程式因將題目與程式邏輯混合,導致題目不易新增、程式不易維護及擴張、開發效率緩慢等問題。 本論文透過對文字應用題進行分析及探討,設計自動產生文字應用題的規則,使程式可依循此規則建構,並且將出題程式分為程式主體及資料檔,資料檔存取文字應用題,程式藉由讀取資料檔產生題目,且定義資料檔編輯方法,使得在新增及維護題目上更有系統,而程式主體則採用物件導向的設計模式,使程式的維護及擴張更加容易,解決舊有程式產生的諸多問題,最後則設計操作介面以方便使用者取用文字應用題。;“Ziyou Emathschool” is a mathematics-learning website with online mathematics problem generator designed specifically for the elementary school kids. It can generate mathematics problems for teachers, parents and school children by executing a variety of computer programs. Those computer programs can generate either calculation-based or text-based mathematics problems(TBMPs) with ease. The purpose of this disseration is to find a new way to generate TBMP so that the extensibilites, maintaintabily and development efficiency of computer programs can be greatly improved. By studing and investigating on many TBMPs, we design a new syntax for TBMP, and then write the coressponding computer programs to generate the problems. The computer programs mainly contain program driver and datafile. The datafile defines all the texts and numbers used in the TBMP. The program driver then reads datafile and generates mathematics problems accordingly. By adopting OOP design, our approach greatly improve the maintainability and extensiability of computer programs. It successfully resolves many deficiencies from the old design. Finally, We also implement a convenient web interface to facilitate users to generate the TBMPs online.