Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Programming.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
168.01 Кб
Скачать

MODULE 3. PROGRAMMING

UNIT 1. PROGRAM DESIGN

STARTER

  1. Consider and answer the following questions:

  • What is programming?

  • What is a program?

  • What is a flowchart? What is it needed for?

  • What is an assembler? What is its role in programming?

  • Think over the best definition of these four terms. Compare your ideas with your partner's.

  • Look up the definitions of the terms in any English-English dictionary and compare them with yours and your partner’s. What are the differences and similarities in them?

  1. The stages of programming are listed below. Fill in the gaps with the missing stages in the correct sequence:

    1. Analysing and defining the problem to be solved

    1. Testing and debugging the program

    1. ______________________________

    1. Training the users

    1. Coding the program

    1. Designing the program

    1. ______________________________

    1. Documenting and maintaining the program

    1. ______________________________

    1. ______________________________

    1. Obtaining feedback from users

  2. Which stage do each of these steps belong to?

    • Clarify objectives and users

    • Debug the program

    • Write programmer documentation

    • Do a structured walkthrough

    • Select the appropriate programming language

  3. Compare your answers with the partner.

Reading

  1. Read and listen to the extract from Edvard Fisher’s lecture on a training course delivered to a group of students about how a program is written, and check your answers to ex. 2 from Starter.

“I would like to start our course by giving you a very basic overview of the programming process. Then we’ll turn to the details. Well, to write a program software developers usually follow some steps.

First of all, they have to understand exactly what the problem is, clearly define its purpose and realise how to solve it. The next step is to design a step-by­ step plan of instructions. This usually takes the form of a flowchart, a diagram that shows the successive logical steps of the program. It uses special symbols to show how the computer works through the program – where it starts and ends, where it makes decisions, where data is input, so forth.

Then developers write the instructions in a high-level language (Pascal, C, C++, etc.) that is called coding. There should be a file for each class, or each closely related group of functions or classes. There may be one file for each functional block in the design, or the blocks may be split up into smaller pieces. Some parts may even be split off into separate libraries.

After that, the program is compiled. Specialists use a compiler to take the source code and compile it into object code. Object code (or machine code) is a translation of the instructions written in the programming language into the native language of the computer. Each source file is translated into one object file.

When the program is written, they have to test it with sample data to see if it works correctly. Almost no programs run perfectly, or even well, from the first time they are run. So, developers have to find out what is wrong with a program and probably go back to the source code to fix the problem. They use special tools to detect bugs or errors. Any errors should be corrected until the program runs smoothly. This is called debugging, or bug fixing. Debugging should include testing, which includes: component testing (each functional block alone), integration testing (combinations of functional blocks and their interfaces) and system testing (the whole system).

Finally, software developers write a detailed description of how to use the program, called program documentation. They also provide maintenance for their customers that implies actions taken to prevent a program from failing or to correct any errors found in the program. After it has been improved, it is published as an updated version”.

  1. Match the terms related to the topic of the Unit (1-7) with their definitions (a-f).

    1. program

    1. a series of instructions written in a form that a computer can read and understand

    1. compiler

    1. a type of diagram that represents an algorithm, workflow or process by using a series of lines to show the different ways in which the process can happen and the different choices that you can make

    1. assembler

    1. the techniques of detecting and correcting errors which may occur in a program

    1. flowchart

    1. a series of instructions that makes a computer perform an action or a particular type of work

    1. machine code

    1. a computer program that changes assembly language into machine language

    1. debugging

    1. a special program that converts the source code into machine code – the language understood by a processor, which consists of 1s and 0s

  2. Answer the following questions:

  • Who works on writing programs?

  • What is the first step of programming?

  • In what form do developers design a step-by­ step plan of instructions?

  • How are the instructions commonly coded?

  • What is an object code?

  • How and why is a program tested?

  • What should be done with errors if they are detected?

  • What types of testing a program do you know?

  • What is a program documentation?

  • Do software developers train their customers how to work with software?

  • Why should software companies provide software maintenance service?

  1. Read the text about different symbols used in flowcharts and label the figures below.

1._________

2.________

3._________

4._________

5.________

6._________

Programming flowcharts can be divided into some types according to the purpose of a project. They are data flowcharts, document flowcharts, system flowcharts, pure flowcharts. Document flowcharts show controls over documents through a system. Data flowcharts show data progress from process to process. System flowcharts illustrate controls for physical or resource interactions, and pure programming flowcharts show the logic and conditions occurring within a computer program.

Flowcharts have arrowheads to indicate the direction of program flow and special symbols to indicate different functions in the program. The circle means the CONNECTOR symbol. It appears when two separate paths through a process come together. It doesn’t contain any text, numbers or symbols.

The FLOW LINE symbol is used to indicate the flow of logic by connecting symbols. The parallelogram means the INPUT or OUTPUT symbol. It looks like a rectangle with two sloping sides and is used for input and output operation.

The ellipse depicts the START or STOP symbol. It is used at the beginning and end of a flowchart. The DECISION symbol has a shape of rhomb. It is used whenever a decision has to be made, and represents the operation in which there are two alternatives, true and false. It often contains comparison functions such as less than or greater than. It has a Yes or True branch at one corner and a No or False branch at another.

The ordinary rectangle depicts the OPERATION or PROCESS symbol. It is used for arithmetic operations and data-manipulations. It may contain words like add, subtract, multiply, divide or make equal to.

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