This preview shows page 1. Sign up to view the full content.
Unformatted text preview: bargain CD's. These are to be placed in a bargain bin. The other CD's are to be placed in a rack having a number of horizontally arranged slots. Each slot holds one CD. The CD's that are to be placed in the rack are all numbered, and at the end of the process they must all be in numerical order, with the lowest numbered CD in the leftmost rack slot and so on. Note that you may not assume that the CD numbers are sequential. For example, we could have four CDs numbered 100, 45, 100004, and 7. The rack is initially empty. As the box is unpacked only the CD at the top of it can been seen and removed. Produce a set of instructions for the employee. You may assume whatever additional elements (e.g. cardboard boxes, pieces of paper, etc.) that you find necessary. Your instructions may involve only simple steps (e.g. move one CD from somewhere to somewhere else), if then else constructs, and while loops....
View Full Document
This note was uploaded on 02/28/2011 for the course MATH 101 taught by Professor Duke during the Spring '11 term at University of Ottawa.
- Spring '11