Главная | Обратная связь | Поможем написать вашу работу!
МегаЛекции

Language work: Problem and solution




Study these ways of linking a problem and a solution.

Problem: get rid of logic errors

Solution: hand-test the program

You can get rid of logic errors by hand-testing the program.

To get rid of logic errors, hand-test the program.

 

Task 7. Match these problems and solutions. Link them following the examples above.

  Problems   Solutions
  connect a computer to a a write code to check a peripheral
  telephone line   is present before any data is sent
  identify items for pricing b use the debug command
  add extra facilities to a computer с add more memory
  get more file storage space d format the disk
  find syntax errors e use a removable disk
  avoid marking the surface of a CD-ROM f install an expansion card
  improve the speed of your computer g install a modem
  avoid system errors h fit a bigger hard disk
  prepare a new disk for use i use barcode labels
  transfer information between i hold it by the edges
  computers    

 

Task 8. Suggest solutions to these problems. Then link the problem and your solution.

17 Make sure there are no viruses on a floppy disk.

18 Prevent unauthorized access to a network.

19 Avoid the risk of losing data.

20 Avoid eye-strain when using computers.

21 Avoid back problems when using computers.

 

Task 9. Draw a flowchart for one of these activities. Then compare your completed flowchart with other students in your group.

2 using a payphone

3 planning a holiday

4 choosing a new computer

5 preparing for an important exam

 

Task 10. Write your own description of the flowchart below.

A 'Start' symbol indicates where the program begins. When the program has started, the initial cost of the item is input. A decision is then taken on which rate of tax to use. This depends on the initial cost. If the cost is greater than 100, the program follows the 'Yes' route and sets the tax rate at 15%. Otherwise the program follows the 'No' route and sets the tax rate at 10%.The two different paths then come back together at the 'connector' symbol and follow the same route. The actual sales tax is now calculated by multiplying the cost by the tax rate. Finally the amount of tax is printed out and the program stops.

PART 3

1. Look through the following words. Match them to the corresponding translation.

equation потреблять, расходовать
list of instructions блок-схема, составлять блок-схему
guard издержки, затраты
appropriate sequence перечень команд
program logic выделять, подчеркивать
flowchart защищать, предохранять, завершать, заканчивать
flowcharting специальные черты, характерные особенности
pictorial representation псевдокод, псевдопрограмма
predefined symbols принцип нисходящей разработки
specifics правила программирования
template наглядное представление
pseudocode логическая последовательность выполнения программы
burden логическая схема выполнения (операций) в цикле
programming rules уравнение, приравнивание
consume построение блок-схемы
emphasize заранее заданные символы
top-down approach шаблон, маска, образец, эталон
looping logic необходимая (требуемая) последовательность

 

2. Read the text and say how you understand the term “computer programming”.

Text 1. COMPUTER PROGRAMMING

Programming is the process of preparing a set of coded instructions which enables the computer to solve specific problems or to perform specific functions. The essence of computer programming is the encoding of the program for the computer by means of algorithms. The thing is that any problem is expressed in mathematical terms, it contains formulae, equations and calculations. But the computer cannot manipulate formulae, equations and calculations. Any problem must be specially processed for the computer to understand it, that is — coded or programmed.

The phase in which the system's computer programs are written is called the development phase. The programs are lists of instructions that will be followed by the control unit of the central processing unit (CPU). The instructions of the program must be complete and in the appropriate sequence, or else the wrong answers will result. To guard against these errors in logic and to document the program's logical approach, logic plans should be developed.

There are two common techniques for planning the logic of a program. 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 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. Pseudocode is 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.

3. Find English equivalents to the following words and word combinations in the text 1:

Совокупность закодированных команд; суть компьютерного программирования; кодирование посредством алгоритма; формулы, уравнения, вычисления; обработать особым образом; перечень команд; необходимая последовательность; защищать от ошибок; составлять план логической последовательности; общепринятая методика; логическая последовательность выполнения программы; построение блок-схемы; наглядное представление; заранее заданные символы; шаблон; псевдопрограмма; без издержек; выделять принцип нисходящей обработки; расходовать меньше времени; логическая схема выполнения операций в цикле; необходимая последовательность операций.

4. Answer the following questions using the information from the text:

1. What is programming? 2. What is the essence of programming? 3. What should be done with the problem before processing by the computer? 4. What is a program? 5. What are instructions? 6. What are the main techniques for planning the program logic? 7. What is a flowchart? 8. What is a template and what is it used for? 9. What do you understand by "pseudocode"? 10. What are the basic structures of pseudocode?

5. Find Russian equivalents to the following English terms:

Program: access program; application program; archived program; binary program; common program; compatible / in-compatible program; control / management program; database program; debugging program; educational / teaching / training program; free program; general-purpose program; high-performance program; off-line program; on-line program; operating (-system) program; processing program; protected-mode program; remote program; running program; self-loading program; simulation program; support program; utility program; virus-detection program; watch-dog program.

Программа в двоичном коде; прикладная программа; (не) совместимая программа; бесплатная программа; про-грамма отладки; сторожевая программа; дистанционная программа; программа моделирования; сервисная про-грамма; вспомогательная программа; программа для дос-тупа (к данным); заархивированная программа; программа, работающая с базой данных; обучающая программа; программа, выполняемая с большой скоростью; универсальная программа; программа, выполняемая в защищен-ном режиме; программа обработки данных; программа операционной системы (системная программа); выполняемая программа; сетевая /несетевая программа; самозагружающаяся программа; часто используемая (распространенная) программа; программа управления; программа обнаружения вирусов.

6. Speak about programming.

7. Look through the terms from the text 2.

programming language — язык программирования

coded form — кодированный вид; кодированное представление

to convey — передавать; сообщать

to improve — улучшать, совершенствовать

machine-oriented language — машинно-ориентированный язык

business-oriented language — язык для (программирования) экономических задач

problem-oriented language — проблемно-ориентированный язык

string of binary — строка двоичного представления

data handling — обработка данных; работа с данными

field-name length — длина имени поля

incorporate features — включать свойства, особенности

versatile — многофункциональный; разносторонний;

универсальный generous — большой, значительный (о количестве)

mathematical relationship — математическая связь (соотношение)

 

8. Read the text 2 and find English equivalents to the following words and word combinations:

Языки программирования; блок-схема; кодированная форма; вид, удобочитаемый для компьютера; в соответ-ствии с набором правил; представить логические шаги программы; таким образом; совершенствовать языки программирования; машинно-ориентированные языки; проблемно-ориентированные языки; обычный термин; язык для программирования экономических задач; обработка информации; операции по вводу-выводу данных; гибкость; идентифицировать поле и его цели; решение проблем математического характера; сферы научного применения; универсальный язык; включать свойства; уникальные возможности; многофункциональный и самый мощный из языков программирования.

 

Text 2. PROGRAMMING LANGUAGES

Let's assume that we have studied the problem, designed a logical plan (flowchart or pseudocode), and are now ready to write the program instructions. The process of writing program instructions 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 using a keypunch, key-to-tape, or key-to-disk, or entered directly into computer memory through a terminal keyboard.

The computer cannot understand instructions written in just any old way. The instructions must be written according to a set of rules. These rules are the foundation of a programming language. A programming language must convey the logical steps of the program plan in such a way that the control unit of the CPU can interpret and follow the instructions. Programming languages have improved throughout the years, just as computer hardware has improved. They have progressed from machine-oriented languages that use strings of binary 1s and 0s to problem-oriented languages that use common mathematical and/or English terms.

There are over 200 problem-oriented languages. The most common of them are COBOL, FORTRAN, PL/I, RPG, BASIC, PASCAL.

COBOL

COBOL was the most widely used business-oriented programming language. Its name is an acronym for Common-Oriented Language. COBOL was designed to solve problems that are oriented toward data handling and input-output operations. Of course, COBOL can perform arithmetic operations as well, but its greatest flexibility is in data handling. COBOL also was designed as a self-documenting language. Self-documenting languages are those that do not require a great deal of explanation in order to be understood by someone reading the program instructions. The self-documenting aspect of COBOL is made possible by its sentence-like structure and the very generous maximum symbolic field-name length of 30 characters. With a field-name length of up to 30 characters, the name can clearly identify the field and its purpose.

FORTRAN IV

The FORTRAN IV language is oriented toward solving problems of a mathematical nature. The name FORTRAN comes from the combination of the words formula translation. The version of FORTRAN IV has been designed as algebra-based programming language. Any formula or those mathematical relationships that can be expressed algebraically can easily be expressed as a FORTRAN instruction. FORTRAN is the most commonly used language for scientific applications.

PL/I

PL/I stands for programming language I. It was designed as a general-purpose language incorporating features similar to COBOL for data handling instructions and features similar to FORTRAN for mathematical instructions. PL/I is much more than a combination of the good features of both COBOL and FORTRAN, as it has many capabilities that are unique. Yet, although PL/I is one of the most versatile and the most powerful of the programming languages, it is not the most commonly used. COBOL and FORTRAN have been available for a longer period of time than PL/I, and many more users work with those languages.

 

9. Answer the following questions:

1. What is the process of writing instructions called? 2. What is a code? 3. How must instructions be written? 4. What is the foundation of any programming language? 5. How was the development of programming languages progressing throughout the years? 6. What are the most common problem-oriented languages? 7. What is COBOL? 8. What functions was COBOL designed for? 9. What does FORTRAN serve for? 10. What capabilities has PL/I?

 

10. Find in the texts 1 and 2 words in the meaning close to the following ones:

Nouns: command; line; characteristic; form; evolution; enumeration; mistake; method; character; manual (instruction); consumption; storage; basics; abbreviation; interpretation; correlation; possibility.

Verbs: include; inform; process; protect; apply; permit; stress; suppose; learn; make up; write; key; explain; define; perfect; advance; decide; execute; demand.

Adjectives: full; incorrect; usual; necessary; accessible; required; considerable; floppy; possible.

 

11. Translate the following texts in writing using a dictionary.

Поделиться:





Воспользуйтесь поиском по сайту:



©2015 - 2024 megalektsii.ru Все авторские права принадлежат авторам лекционных материалов. Обратная связь с нами...