首页 | 本学科首页   官方微博 | 高级检索  
     检索      

图形环境下的汉诺塔演示
引用本文:卫洪春.图形环境下的汉诺塔演示[J].电子设计工程,2014(15):8-10.
作者姓名:卫洪春
作者单位:四川文理学院计算机科学系,四川达州635000
基金项目:国家自然科学基金(61152003);四川省青年基金(10ZB085)
摘    要:经典的汉诺塔问题的求解主要是采用递归算法来实现。但是在不同的语言开发环境下,其求解过程主要是以控制台模式的字符方式来显示算法的运算结果。基于控制台模式下移动汉诺塔的运算结果虽然正确,但存在感观上不直观的原因,文中提出了在图形环境中显示移动汉诺塔运算结果的观点,采用了面向对象的程序设计思想和传统的递归程序设计方法,结合图形环境中相关的绘图知识,使移动汉诺塔的运算过程更形象、更直观,达到了更好的可视化演示效果。

关 键 词:汉诺塔  递归  图形  C++

Demo on Hanoi Tower in graphical environment
Institution:WEI Hong-chu (Computer Science Department, Sichuan University of Arts and Science ,Dazhou 635000, China)
Abstract:The methods for solving the classical problem on Hanoi Tower is mainly used to adopt recursive algorithm at present.However,in different development environments,its solving process is to display operating results mainly based on the character mode in console mode.In console mode, although the operating result of moving Hanoi Tower is correct,it is not intuitive. This article presents the view of displaying the operating results in graphical environment , adopt object-oriented programming concepts and traditional recursive programming method, combine related drawing knowledge of graphical environment.It makes the operating process more vivid, more intuitive,and achieves a better visual demonstration effect.
Keywords:Hanoi Tower  recursion  graphics
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号