Repeat Exercise 21.14 adding a check in T 1 so that Y does not exceed 90.

What will be an ideal response?


T1 T2
read_item(X);
X := X-N;
read_item(X);
X := X+M;
write_item(X);
read_item(Y);
if X > 90 then exit
else write_item(X);
Y := Y+N;
if Y> 90 then
exit
else write_item(Y);
The above condition does not change the final outcome unless the initial value of X > 88 or
Y > 88. The outcome obeys the implied consistency rule that X < 90 and Y < 90.

Computer Science & Information Technology

You might also like to view...

Case-Based Critical Thinking QuestionsCase 4-3Sam is trying to decide the best way to design the background of his web page. He would like to add background images and background styles to his design. He needs to understand how browsers load a background image as well as learn about background style properties. Sam wants the browser to load a background image, repeating the image in both the vertical and horizontal directions until the background is filled. This process is known as ____.

A. painting B. tiling C. papering D. drawing

Computer Science & Information Technology

VMM is designed to manage a single Hyper-V host running hundreds of virtual machines.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

In regard to spelling and grammar in Office 2013, it is important to know that, in general:

A) Word and PowerPoint check spelling and grammar as you type; Access and Excel do not. B) you turn on the Spelling and Grammar features in all applications. C) all Office applications check your spelling and grammar as you type. D) only a small selection of words will be checked as you type; the rest must be accessed through the Spelling and Grammar features.

Computer Science & Information Technology

A(n) ____ reference has a full notation such as C:\Program Files\User\index.html.

a. relative b. internal c. absolute d. external

Computer Science & Information Technology