Teconolo

Páginas: 15 (3626 palabras) Publicado: 30 de mayo de 2012
Introduction to Programming with RAPTOR

By Dr. Wayne Brown

What is RAPTOR?
RAPTOR is a visual programming development environment based on flowcharts. A flowchart is a collection of connected graphic symbols, where each symbol represents a specific type of instruction to be executed. The connections between symbols determine the order in which instructions are executed. These ideas willbecome clearer as you use RAPTOR to solve problems.

We use RAPTOR in CS110 for several reasons.
• The RAPTOR development environment minimizes the amount of syntax you must learn to write correct program instructions.
• The RAPTOR development environment is visual. RAPTOR programs are diagrams (directed graphs) that can be executed one symbol at a time. This will help you follow theflow of instruction execution in RAPTOR programs.
• RAPTOR is designed for ease of use. (You might have to take our word for this, but other programming development environments are extremely complex.)
• RAPTOR error messages are designed to be more readily understandable by beginning programmers.
• Our goal is to teach you how to design and execute algorithms. These objectives do notrequire a heavy-weight commercial programming language such as C++ or Java.


RAPTOR Program Structure
A RAPTOR program is a set of connected symbols that represent actions to be performed. The arrows that connect the symbols determine the order in which the actions are performed. When executing a RAPTOR program, you begin at the Start symbol and follow the arrows to execute the program. ARAPTOR program stops executing when the End symbol is reached. The smallest RAPTOR program (which does nothing) is depicted at the right. By placing additional RAPTOR statements between the Start and End symbols you can create meaningful RAPTOR programs.

Introduction to RAPTOR Statements/Symbols
RAPTOR has six (6) basic symbols, where each symbol represents a unique type of instruction. Thebasic symbols are shown at the right. The top four statement types, Assignment, Call, Input, and Output, are explained in this reading, The bottom two types, Selection and Loops, will be explained in a future reading.


The typical computer program has three basic components:
• INPUT – get the data values that are needed to accomplish the task.
• PROCESSING – manipulate the data valuesto accomplish the task.
• OUTPUT – display (or save) the values which provide a solution to the task.
These three components have a direct correlation to RAPTOR instructions as shown in the following table.

|Purpose |Symbol |Name |Description |
|INPUT |[pic]|input statement |Allow the user to enter data. Each data value is stored in a |
| | | |variable. |
|PROCESSING |[pic] |assignment statement |Change the value of a variable using some type of mathematical |
|| | |calculation. |
|PROCESSING |[pic] |procedure call |Execute a group of instructions defined in the named procedure. In |
| | | |some cases some of the procedure arguments(i.e., variables) will |
| | | |be changed by the procedure's instructions. |
|OUTPUT |[pic] |output statement |Display (or save to a file) the value of a variable. |



The common thread among these four instructions is that they all do something...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Teconolo Logistica

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS