Студопедия

КАТЕГОРИИ:


Архитектура-(3434)Астрономия-(809)Биология-(7483)Биотехнологии-(1457)Военное дело-(14632)Высокие технологии-(1363)География-(913)Геология-(1438)Государство-(451)Демография-(1065)Дом-(47672)Журналистика и СМИ-(912)Изобретательство-(14524)Иностранные языки-(4268)Информатика-(17799)Искусство-(1338)История-(13644)Компьютеры-(11121)Косметика-(55)Кулинария-(373)Культура-(8427)Лингвистика-(374)Литература-(1642)Маркетинг-(23702)Математика-(16968)Машиностроение-(1700)Медицина-(12668)Менеджмент-(24684)Механика-(15423)Науковедение-(506)Образование-(11852)Охрана труда-(3308)Педагогика-(5571)Полиграфия-(1312)Политика-(7869)Право-(5454)Приборостроение-(1369)Программирование-(2801)Производство-(97182)Промышленность-(8706)Психология-(18388)Религия-(3217)Связь-(10668)Сельское хозяйство-(299)Социология-(6455)Спорт-(42831)Строительство-(4793)Торговля-(5050)Транспорт-(2929)Туризм-(1568)Физика-(3942)Философия-(17015)Финансы-(26596)Химия-(22929)Экология-(12095)Экономика-(9961)Электроника-(8441)Электротехника-(4623)Энергетика-(12629)Юриспруденция-(1492)Ядерная техника-(1748)

Steps in writing a program




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, there­fore, 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 in­structions. It allows a program-like structure without the bur­den 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 translat­ed, 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-12-27; Просмотров: 2192; Нарушение авторских прав?; Мы поможем в написании вашей работы!


Нам важно ваше мнение! Был ли полезен опубликованный материал? Да | Нет



studopedia.su - Студопедия (2013 - 2024) год. Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав! Последнее добавление




Генерация страницы за: 0.009 сек.