Font Size: a A A

Reverse Demonstration Of Algorithm In CAI

Posted on:2010-01-22Degree:MasterType:Thesis
Country:ChinaCandidate:C H LiFull Text:PDF
GTID:2178360278481265Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
In the teaching of programming and data structure algorithm, the algorithm is too abstract for students to understand its essence. Algorithm demonstration can assist teachers to teach vividly and help students understand the design principles and implementation of algorithm efficiently and easily.Based on a comprehensive analysis of existing CAI software, to avoid the lack of existing CAI software, a reverse demonstration algorithm system was proposed. The most significant characteristic is that the system allows the user to edit the previous code, and implements the automatic analysis and interpretation of algorithm and derives design principle and implementation process. Subsequently, the whole execution of algorithm is demonstrated through vividly presentation of dynamic graphs. It provides a great help for students to understand algorithm, programming, and debugging.The key to the reverse algorithm demonstration is how to analyze and simulate the execute process of algorithm correctly. In this paper, an algorithm interpreter is designed to analyze and interpret algorithm automatically. Firstly, the lexical parsing and syntax parsing are analyzed by lines in detail. According to lexical parsing, the symbols and words of algorithm are identified. Then the interpreter judges the composition of statement and its legitimacy by syntax parsing. Subsequently, the interpretation and translation of algorithm is achieved by simulating execute process of algorithm. In the process of interpretation, the method of operator priority analyse is used for evaluating expression. For ease of evaluating expression, the paper carries out unified coding for every operator according to operator precedence. The graphics animation implements mainly through getting screen coordinates accurately and changing the coordinate value in the picture. Each picture is stored in the resource library with the unique ID number. In accordance with the requirements of algorithm, the program can determine the specific object which is called.The paper implemented reverse demonstration based on sort algorithm using VC++ 6.0. The effectiveness of reverse demonstration method is proved. Good teaching effect is verified in actual teaching at the same time.
Keywords/Search Tags:Algorithm Demostration, Data Structure, Lexical Parsing, Syntax Parsing, Method Of Operator Priority Analyse
PDF Full Text Request
Related items