Unit 1. Program design

MODULE 3. PROGRAMMING

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?

2. 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 A.Testing and debugging the program
2.______________________________ B.Training the users
3.Coding the program C.Designing the program
4.______________________________ D.Documenting and maintaining the program
5.______________________________  
6.______________________________  
7.Obtaining feedback from users  

3. 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

4. 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”.

2. Match the terms related to the topic of the Unit (1-7) with their definitions (A-F).

1.program A.a series of instructions written in a form that a computer can read and understand
2.compiler B.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
3.assembler C.the techniques of detecting and correcting errors which may occur in a program
4.flowchart D.a series of instructions that makes a computer perform an action or a particular type of work
5.machine code E.a computer program that changes assembly language into machine language
6.debugging F.a special program that converts the source code into machine code – the language understood by a processor, which consists of 1s and 0s

3. 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?

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

Unit 1. Program design - student2.ru Unit 1. Program design - student2.ru Unit 1. Program design - student2.ru Unit 1. Program design - student2.ru Unit 1. Program design - student2.ru Unit 1. Program design - student2.ru
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.

5. Decide if the following sentences are true or false. Correct the false sentences. Use the phrases from Appendix 3 to help you.

· Some types can be distinguished among programming flowcharts due to the purpose of a project.

· Document flowcharts show controls for physical or resource interactions.

· Pure programming flowcharts illustrate the logic and conditions occurring within a computer program.

· Flowcharts have directional arrows to show the different ways in which the process can happen.

· The ellipse depicts the INPUT or OUTPUT symbol.

· The CONNECTOR symbol represents the operation in which there are two alternatives, true and false.

· The OPERATION or PROCESS symbol indicates the kind of arithmetic operation.

LANGUAGE WORK

1. Look at the words in the boxes and define if they are nouns (n), adjectives (adj), verbs (v) or adverbs (adv). Write n, adj, v, adv next to each word. There may be more than one possible answer.

bug ______ debug ______ debugger ______ debugging ______

· Any error or malfunction of a computer program is known as a ___________.

· A ____________ is a computer program that looks for and removes mistakes from another program so that it works correctly.

· The previous method of ____________ by adding print statements has two disadvantages.

· A _________ can only be caused by the code in the program that has already executed.

· An easier solution that is less optimal can usually be ___________ more quickly than an optimal but more complex solution.

compile _______ compiler ________ compilation ________

· Learning how to _________ directly from within the Windows shell is an essential skill to master.

· Programs written in a high-level language require ______________ - that is, translation into machine code, the language understood by the processor.

· A source code written in a programming language is converted into another computer language (the target language, often having a binary form known as object code) is known as _______________.

· Programmers usually ___________ their programs to generate an object program and diagnose possible errors.

program ______ programmer ______ programming ______ programmable ______

· Pointers and pointer declarations in C cause beginners all sorts of strange problems that experienced C _____________ find hard to understand.

· ________________ controller is a digital computer used for automation of typically industrial electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures.

· Comments are used to explain how a certain part of a ___________ works.

· Sometimes ____________ use special software, such as IDEs, which have many features to help them to make programs , and sometimes they use simpler software, called a text editor.

· Computer _________ is the craft of writing a set of commands or instructions that can later be compiled and/or interpreted, and then inherently transformed to an executable that an electronic machine can execute or "run".

digitizer _______ digitize _______ digital _______ digitally _______

· In optical disc technology, analog signals are converted into _______ signals (with the exception of the video information on laserdiscs).

· My digital voice ____________ has a storage capacity of 16 GB.

· The main difference between laserdisc and other optical discs is that the audio signal on Laserdiscs is recorded __________, just like CDs, but that the video signal is recorded in an analog way.

· ____________ speech is anything spoken that has been converted from an analog to a binary signal to be used for playback at a later time.

· A glass piece that is attached to the LCD is a __________ that converts your actions (press, swipe, etc.) into a _______ signal that your phone understands.

2. Match the following types of programs with their Russian equivalents.

Access program; application program; archived program; binary program; common program; compatible/ incompatible 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 pro-gram; remote program; running program; self-loading program; simulation program; support program; utility program; virus-detection program; watch-dog program Программа в двоичном коде; прикладная программа; (не) совместимая программа; бесплатная программа; программа отладки; сторожевая программа; дистанционная программа; программа моделирования; сервисная программа; обучающая программа; вспомогательная программа; программа для доступа (к данным); заархивированная программа; программа, работающая с базой данных; программа, выполняемая с большой скоростью; универсальная программа; программа, выполняемая в защищен-ном режиме; программа обработки данных; программа операционной системы (системная программа); выполняемая программа; сетевая /несетевая программа; программа управления; самозагружающаяся программа; часто используемая программа; программа обнаружения вирусов

GRAMMAR

1. Translate the following sentences from Russian into English. Use Grammar guide 3 and Grammar guide 4 to help you.

· Мне бы хотелось, чтобы ты стал ведущим специалистом в компьютерных технологиях.

· Если бы данная программа была отлажена инженером-программистом вовремя, то нам не пришлось бы сейчас исправлять ошибки.

· Они хотят, чтобы разработчик ПО закодировал программные команды в соответствующей последовательности.

· Менеджер потребовал, чтобы эта работа была выполнена в срок.

· Если бы ты записал алгоритм компьютерных операций, ты бы не сделал столько ошибок.

· Нам бы хотелось, чтобы вы не использовали аббревиатуры, которые не знакомы вашим заказчикам.

· Если бы ты вставил здесь символ проверки, то программа бы решила какую ставку налога выбрать в этой блок-схеме.

· Если стоимость выше 1000, то программа выбирает путь “Yes” и устанавливает налог в 15%.

SPEAKING

1. Study the following flowchart to the right. 2. Create the assignment for this flowchart. 3. Share your ideas with the partner. Choose the best task. 4. Come up with your own description of this flowchart. PROJECT WORK Draw a flowchart for one of these activities. Compare your completed flowchart with other students in your group. · hiring process for businesses; Unit 1. Program design - student2.ru

· hiring process for businesses;

· customer payment process flow for banks;

· medical records retrieval for medical establishments.

Наши рекомендации