Студопедия

КАТЕГОРИИ:

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника



Steps in writing a program




Читайте также:
  1. A) Read the two texts and translate them into Russian in writing.
  2. Broadcast Writing
  3. Macr; Writing a Summary
  4. paragraph writing
  5. Pre-release programs
  6. Programming languages
  7. Programming languages
  8. SPEAKING/WRITING PRACTICE SECTION
  9. SPEAKING/WRITING PRACTICE SECTION
  10. SPEAKING/WRITING SECTION

The phase in which the computer programs are written is called the development phase. To write a program, software developers usually follow these steps.

· First they try to understand the problem and define the purpose of the program.

· Then they design a logical plan of the program. There are two common techniques for planning the logic of a program.

A flowchart to calculate income tax The first technique is flowcharting. A flowchart is a plan in the form of a graphic or pictorial representation that uses predefined symbols to illustrate the program logic. It is, therefore, a "picture" of the successive logical steps to be performed by the computer. Each of the predefined symbol shapes stands for a general operation. The symbol shape communicates the nature of the general operation, and the specifics are written within the symbol. A plastic or metal guide called a template is used to make drawing the symbols easier. The second technique for planning program logic is called pseudocode– an imitation of actual program instructions. It allows a program-like structure without the burden of programming rules to follow. Pseudocode is less time-consuming for the professional programmer than is flowcharting. It also emphasizes a top-down approach to program structure.

Pseudocode has three basic structures: sequence, decision, and looping logic. With these three structures, any required logic can be expressed.

· Next they write the program instructions. This is called coding. The instructions will be written on a form called a coding form. The instructions we write will be recorded in a machine-readable form. The instructions must be written according to а set of rules that are the foundation of a programming language.

· When the program is written, they test it: they run the program to see if it works and use special tools to detect bugs, or errors. Any errors are corrected until it runs smoothly. This is called debugging, or bug fixing. Debugging is a very important task in the software development process, because an incorrect program can have significant consequences for its users. Some languages are more prone to some kinds of faults because their specification does not require compilers to perform as much checking as other languages.



There are two kinds of errors or bugs with which programmers must deal.

The first type is the coding error. Such errors are syntax errors that prevent the language processor from successfully translating the source program to object program code. The language processor identifies the nature and the location of the error on the source program listing, so these errors are relatively easy to find and correct.

The second type of bug is the logic error. The computer program can be successfully translated, but the program does not produce the desired results. These errors are generally much more

difficult to find and to correct than are coding errors. Logic errors can be avoided through careful planning of the program logic.

· Finally, software companies write a detailed description of how the program works, called program documentation. They also have a maintenance program. They get reports from users about any errors found in the program. After it has been improved, it is published as an updated version.


Дата добавления: 2014-11-13; просмотров: 21; Нарушение авторских прав







lektsii.com - Лекции.Ком - 2014-2021 год. (0.009 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты