Dale - Computer Science Illuminated 184

Dale - Computer Science Illuminated 184 - 6.2 Top-Down...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
6.2 Top-Down Design 157 just press the return key if there is no data for an item. We need to enclose these instructions within a loop. Determining when there are more names to enter is easy in a by-hand algo- rithm: The stack of papers and cards is empty. Determining how to do it in a computer algorithm is more difficult. Let’s assume that the level of detail is sufficient. What do Write and Read mean? These are special words that we use with algorithms to stand for “put information on the screen” and “get the data that the user has entered.” Remember from the discussion of von Neumann machines that there are input devices, which allow us to enter data from the outside world into memory, and there are output devices, which allow us to display data so that the world outside the computer can see it. We have used some shorthand in this subalgorithm that needs clarifying. We have called the information about a person name . Name is actually a collection of four pieces of data, called fields. We use the following names
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/13/2011 for the course CSE 1550 taught by Professor Marianakant during the Fall '10 term at York University.

Ask a homework question - tutors are online