Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Programming.doc
Скачиваний:
21
Добавлен:
25.04.2019
Размер:
1.14 Mб
Скачать

Unit 2. Program Design

Warm-up

Task 1. In pairs, try to think of an answer for the question:

What is programming?

Decide which of the definitions below is the most appropriate? Give a reason for your choice.

  1. The process of writing and testing programs for computers.

  2. The process by which a set of instructions is produced for a computer to make it perform a specified task. The task can be anything from the solution to a mathematical problem to the production of a graphics package.

  3. The act of writing a computer program.

  4. The craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. Programming has elements of art, science, mathematics, and engineering.

  1. A pastime similar to banging one's head against a wall, but with fewer opportunities for reward.

Reading

Task 2. Put these five stages of programming in the correct sequence.

  1. Design a solution 1. _____

  2. Code the program 2. _____

  3. Document and maintain the program 3. _____

  4. Clarify the problem 4. _____

  5. Test the program 5. _____

Task 3. To which stage does each of these steps belong?

  1. Clarify objectives and users _____

  2. Debug the program _____

  3. Write programmer documentation _____

  4. Do a structured walkthrough _____

  5. Select the appropriate programming language _____

Task 4. Read the text and compare your answers for Tasks 2 and 3.

Steps in Computer Program Development

The steps in the development of each of the computer programs that make up the computer program component of a system are:

  1. define the function of the program;

  2. plan the logic of the program;

  3. code the program;

  4. test and debug the program;

  5. complete the documentation.

Although the programmer is responsible for

writing the computer program, the system analyst must communicate the computer program requirements to the programmer. The function of each program was defined for the programmer when functions were allocated during system design. Detailed data flow diagrams (DFD) are prepared for each program from the decomposed DFDs created during the design phase. These DFDs define the function of each program.

In program planning, the logic to be used to solve the problem is developed. Algorithms, computer program logic flowcharts, and structure charts are useful tools for program planning. Algorithms are sets of rules or instructions used to accomplish tasks. They may be stated as formulas, decision tables, or narratives.

The next step, writing, or coding, a program, is the actual writing of computer instructions. These instructions will be translated to machine code and followed by the computer; they should follow the steps of the program logic plan.

Several programming languages, particularly COBOL, PL/I, and RPG, are commonly used to solve business problems. In addition to these traditional languages, organizations using database management systems may choose to generate programs using the query language of the DBMS. These query languages are part of a package of programming tools known as fourth-generation languages. Each language has its advantages and disadvantages. Most computer installations have a standard language used by their programmers. Programmers usually are not given a choice of language unless some special circumstances exist.

Testing and debugging a program involve:

  1. translating the coded program into machine language, a process called compilation;

  2. testing the translated program with sample data and checking the result.

If the results of testing are not correct, the program is said to have "bugs". Debugging is the process of correcting computer programs to obtain correct results.

The last step is to complete the documentation for the program. The documentation must include a statement of the purpose of the program, a description of the solution logic, a listing of the program instructions, and sample outputs from the completed programs. Information provided to the programmer by the analyst, such as descriptions of program inputs, outputs, and files, should be included. Instructions to operators explaining how the program is to be used must be written before the program documentation is completed.

Language work

General and Special Questions

Word order in general questions: auxiliary verb + subject + verb

e.g. Have you ever used a computer?

Word order in special questions is as following:

question word + auxiliary verb + subject + verb

e.g. How long have you been restoring the data?

If there is more than one auxiliary verb, we put only the first auxiliary in front of the subject:

e.g. How long has this program been used?

Task 5. There are answers to questions about the text. Write the questions.

  1. There are five main steps in the computer program development.

  2. For writing the computer program.

  3. It is developed in program planning.

  4. As formulas, decision tables, or narratives.

  5. Yes, it is the actual writing of computer instructions.

  6. No, programmers usually are not given a choice of languages.

  7. It is called compilation.

  8. When the results of testing are not correct.

  9. To obtain correct results.

  10. They must be written before the program documentation is complete.

Task 6. Choose the correct word to complete each sentence. You may have to change some words slightly.

  1. compilation, compiler, compile, compiled

    1. It took weeks __________ the new customer database.

    2. A source program cannot be directly processed by the computer until it has been __________.

    3. If the errors are removed and the program re-run, the process of __________ starts all over again, but this time the __________ program will be executed.

    4. A computer needs its own __________ for the various high-level languages if it is expected to accept programs written in those languages.

  1. program, programmer, programming, programmable

    1. The __________ CD-player allows the user to change the order tracks are played in.

    2. She __________ the VCR to come on at eight.

    3. Most computer __________ make a plan of the program before they write it. This plan is called a flowchart.

    4. It is unusual for a __________ to work correctly the first time it is tested.

  2. bug, debug, debugger debugging

    1. The best compilers usually include an integrated __________ which detects syntax errors.

    2. New programs need __________ to make them work properly.

    3. Once you have written your program you have to test it with sample data to see if there are any __________ or errors.

  1. instruction, instruct, instructed, instructor

    1. The next step is to design an algorithm, which is a step-by-step plan of __________ used to solve the problem.

    2. We have been __________ that a decision will not be made before the end of the week.

    3. Our maths __________ explained to us the principles of binary arithmetic.

Speaking

Task 7. Say what has happened in the cartoon. What do you think this cartoon is about? Write a caption for the last picture. Translate each caption into English.

Как было предложено организатором разработки

Как было описано в техническом задании

Как было спроектировано ведущим системным специалистом

Как было реализовано программистами

Как было внедрено

____________________

Task 8. Work in pairs and discuss the following:

  • Many would argue that computer’s actions are merely consequences of how it was programmed, and thus a computer cannot possess free will. In turn, a computer shouldn’t be held responsible for its actions.

  • Is human’s mind a computer?

  • Are humans programmed at birth?

  • Are humans responsible for their actions?

Writing

Task 9. Look at the scheme below and describe activities and connections of the evolutionary development.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]