Добавил:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
1-2 Английский / Учебник для Сукнова М.П. (01.07.2015).rtf
Скачиваний:
223
Добавлен:
31.01.2021
Размер:
20.64 Mб
Скачать

If X, then y

In this section, we will revise structures commonly used in programming. You have met these structures in earlier units but in different contexts.

Study this decision table. It shows the rules that apply when certain conditions occur and what actions to take. Using it, we can make rules like this:

1. If a guest stays 3 nights in January and if one night is Sunday, then charge 2 nights at full price and 1 night at half-price.

2. If a guest stays 3 nights and one night is not Sunday and it is not January, then charge 3 nights at full price.

CONDITIONS

DECISION

RULES

1

2

guest stays 3 nights

Y

Y

1 night is Sunday

Y

N

month is January

Y

N

Actions

charge 3 nights at full price

N

Y

charge 2 nights at full price

Y

N

charge 1 night at half-price

Y

N

Exercise 4. Link these statements with while or until, whichever is most appropriate.

Look through member records. There are no more records.

Display guests addresses. There are no more addresses remaining.

List all items. There are no more items left.

Print some more client names. There are still names available.

Calculate all figures. There are no more figures.

Search for information containing the term. There is still information containing the term.

Total all items. There are still some items remaining.

Read these records. There are records left.

Rewrite these records. There are no more records.

Study this list of items. There are some items left.

Exercise 5. Put the words into the right order.

my you ask help for If just it need.

selects appear the the menu offering several Triangle choices icon a If user might.

If to to next you step the get you object will have want to select an.

If application want to the of a execute triangle might a set different create instructions you.

eligible the package employees qualify benefit If are for package a specific welders automatically for.

available a simple benefit welder is If later where a different relocated package is revision is.

the right the mouse on “Right triangle” clip a might clicks voice explain If the properties use of right triangles.

right If the of on is triangles clicked mouse explains “Equilateral triangle” the voice properties equilateral.

you If with should might deal applications you use OOP multimedia probably.

a condition then process this If certain is true instruction.

Exercise 6. Create statements about the decision table as shown.

Example: If a guest books a hotel room in summer and stays for a week, then charge at 100$.

Conditions

Decision Rules

Guest stays a week

Guest stays a decade

Guest stays a fortnight

Guest stays a month

Summer

100$

140$

200$

400$

Spring

80$

120$

160$

320$

Autumn

70$

110$

140$

280$

Winter

50$

90$

100$

200$

Exercise 7. Choose the right variant.

1. (The, a, -) tea, which (grow) in India and China, (be) the national drink (of, off, at) Britain.

2. Mrs Green (wait) for the doctor for half an hour. When he (examine) the boy, he said, "(The, a, -) child must stay in (a, the, -) bed (as, just, until) he (get) (good)".

3. Hijackers (still, hold) twenty passengers in a plane at (a, the, -) Manchester Airport.

4. The hostages (sit) in the plane without (a, the, -) food or water for two days already.

5. As you (can, must, may) see from the letter, I (change) my address and live in the suburbs now.

6. Living in the country is (expensive) than in (a, the, -) big city nowadays.

7. I decided to change from la, the, -) central London to the suburbs because it (become) so expensive to live there.

8. Members of (the, a, -) British Parliament (pay) salaries since 1911.

9. (The, a, —) hereditary principle still operates in Great Britain and the Crown (pass) on to the sovereign's (older, elder, eldest) son.

10. If (many, a few, few, any) news comes in while I (be) away, let me know.

11. Henri Nestle, who was Swiss, (develop) the process of making (a, the, —) milk chocolate.

12. This week the police (arrest) a couple in (the, —, a) Switzerland, where they (try) to sell chocolate secrets.

13. I think that people (be, only) (interested, interesting) in news which (happen) near them or which (affect) them (economical/economically).

14. The word chocolate, which (come) from (the, a, -) Aztec language, is (a, the, —) only Aztec word in (the, a, -) English.

15. (The, -, an) Incas (discover) popcorn. They (live) in (-, the, a) South America in (a, the, -) fifteenth century.

16. People who live in (the, a, -) Netherlands (call) (the, a, -) Dutch.

17. The policeman asked me if the car (park, parking, parked) near the office (belong) to me.

18. I'm staying there until he (return) from his holidays. Then I (go) (on, in, at) holiday to Scotland.

19. Remember that even if you (have) the right qualification, you (may, could, should) have to fill in lots of application forms before you (ask) to attend an interview.

20. You are working slowly. - If I (have) a calculator, I (can) work this out a lot quicker.

WRITING

Projects. Perform the project given

Form a group of two to five students as the project team for a systems development project. Elect one person as the team leader, who will assign tasks to each group member. Your team’s mission is to complete the planning phase for a systems development project and produce a Project Development Plan. The first task is to identify and briefly describe an information system at school, work, or local business that needs improvement. The second task is to make a list of problems and opportunities that exist in that system. The third task is to make a list of tasks your team would perform, design, construct, and implement a new information system. Finally, incorporate all your findings into a document that would serve as the Project Development Plan. Submit this plan to your instructor, who might provide additional directions for your group work and report format.

Create 10 rules for an expert system that pertains to your career field. To complete the assignment, think of a set of simple decisions that someone on the job might be required to perform. For example, a loan officer might be required to make a quick evaluation of a borrower, an auto mechanic might be required to figure out what various tapping noises mean, or a fitness instructor might be required to recommend the best type of fitness class for clients. Make a list of 10 rules that would help make the decision. The rules should be in the format IF…THEN…Submit your rules to your instructor.

UNIT 23