Holt Software Books [Graphical Version] | [Printer Friendly Version]
![[Cover of Book]](img/problem_solving_turing.gif) |
Problem Solving and Programming in Turing
Out of Print. No longer available for purchase.
|
| Title: |
Problem Solving and Programming in Turing |
| Author: |
J.N.P. Hume |
| ISBN: |
0-921598-16-5 |
| Publisher: |
Holt Software Associates Inc. |
| Binding: |
Softcover |
| Pages: |
350 pgs |
| Price: |
Out of Print. No longer available for purchase. |
| Ordering Information: |
Out of Print. No longer available for purchase. |
| Program Examples: |
Not Available |
| Solutions Manual: |
Available [Click here for
information on obtaining Solutions Manuals for Holt Software
publications.] |
This text is an important resource for teachers and students interested in
computing. It meets the demand for a true ploblem solving textbook
written especially for high schools. Well known author J.N.P. Hume
demonstrates the essential link between programming and problem
solving. He explores the various known methodologies and provides
the fundamentals of computer programming for exploring the kinds
of problems that can be examined by these methods.
In whole, it covers slightly less material than the Turing Tutorial Guide.
It is suitable for a grade 10 course (where the first nine chapters might be
covered) or grade 11 course, where the whole book would be covered.
Preface to Problem Solving and Programming with Turing (First Edition)
Computer Programming is approximately forty years old and problem solving
(both as concept and goal) has been with us since the beginning.
In the past, one of the common difficulties with problem solving-based
computer science textbooks was that problem solving was often very
much subjugated to programming language issues. Other textbooks tended
to select a single systematic way of creating a computer program, usually
by the step-by-step refinement technique, and apply it throughout the
book to all programs.
In Problem Solving and Programming in Turing I have tried to create a
text in which problem solving is much more than a servant of computer
programming. Rather, I have tried to use computer programming as a
means of illustrating various problem solving techniques. (This means
that chapter headings that are a normal part of a book dedicated to
computer programming do not appear. For example, searching and sorting
is spread over several chapters that have titles concerning problem
solving methods.)
I have tried to organize the sections in a useful and intuitive manner.
In each chapter I have attempted to build successively on the concepts
learned from previous chapters. It is important to note however, that
individual teachers may have other preferences and so may wish to deal
with the chapters in a different order.
I have attempted to pose problems that all students can relate to. I
have begun the book with arithmetic problems because here the idea
of abstraction appears most naturally, for example, that 2 + 2 = 4.
It is not my intention though, to push the solution of mathematical
problems as the only way to approach the subject. Graphics-based
problems are just as demanding and intriguing programs that produce
graphical output have a great appeal for students and provide a natural
way of involving them and encouraging then to learn new skills in their
search for the most dynamic graphic.
In Problem Solving and Programming in Turing, graphics, in the form of
character graphics, are used as soon as the notion of repetition is
introduced. Pixel graphics comes a little later.
For each chapter I have included an Errors You Might Make
section, in hope of assisting students to identify possible areas of
difficulty, and thus save them from frustration. Students should be
encouraged toward careful reading of this section to ensure that they
recognize that these are mistakes to be avoided.
Considerable effort has also been taken to provide information for
students in a readable, straightforward, and friendly manner. The
sections have been laid out with easy-to-find subject headings. The
Table of Contents and the Index will help readers find
specific information. A Glossary of Technical Terms has also
been provided to help students with the subject vocabulary. The
language of the text has been directed at the average high school
student. My goal was to make it as clear and readable as possible
without over simplifying the material. It should be noted, however,
that students with language difficulties may require additional assistance.
Computer science has undergone many changes in the last forty years, and
of all subject areas that we teach, it is perhaps the most fluid and
hence interesting. The development of new programming languages like
Turing have allowed us to progress from spaghetti programs that were
unstructured, error prone, and unmanageable to structured programs
with proper control constructs. With these improvements, programs are
no longer labyrinths of control. As teachers, this means that we are
now free to concentrate on the important ideas of computer science.
Now it is time to marry the power of the computer to the human activity
of problem solving. And that is what I have tried to do in this book.
J.N. Patterson Hume
University of Toronto
Table of Contents of Problem Solving and Programming in Turing
1. PROBLEM SOLVING: A MAP OF THE TERRITORY 1
Questions and Answers about Problem Solving 2
Well-Posed Problems 3
Problems 4
Calculators and Computers 5
Problem Solving and Computer Programming 6
Computer Programming and Systematics 7
How to Begin 8
The Editor 8
Questions and Answers 8
Technical Terms 9
Problems and Questions for Discussion 9
Questions for Discussion 10
Technical Terms you should now know 10
2A. THE EDITOR FOR THE PC 11
The Turing Environment 12
Typing in the Program Window 13
Editing What You Have Typed 13
Selecting a Menu Command 14
Saving What You Have Typed on the Disk 15
Your Computer Disk 15
Running a Turing Program 16
Starting a New Program 17
An Example Turing Program 17
Menus of Commands 20
Problems 20
Selecting Text in the Program Window 21
Using a Mouse 22
Editing the Program using Menu Commands 22
Searching for and Replacing Text 23
Redirecting Output to a Disk File 24
Input Data from a Disk File 24
Printing a Program or its Output 24
Technical Terms you should now know 25
2B. THE EDITOR FOR THE MACINTOSH 27
The Turing Environment 28
The Mouse 28
Startup Procedure 29
Selecting a Menu Command 29
Using the Turing System 30
Printing or Saving the Program or Input/Output 31
Running a Turing Program 32
Starting a New Program 33
An Example Turing Program 35
Menus of Commands 38
Problems 38
Editing The Program 39
Problems 40
Searching for and Replacing Text 41
Redirecting Output to the Disk 42
Input Data from Disk Files 44
Technical Terms you should now know 46
2C. THE EDITOR FOR THE ICON 49
The Turing Environment 50
Moving the Cursor 51
Typing in the Window 51
Editing What You Have Typed 52
Erasing the Contents of the Input Window 53
Printing What You Have Typed 53
Saving What You Have Typed on the Disk 54
Your Computer Disk 55
Listing a Directory of Files on the Disk 55
Deleting a File from the Disk 55
Renaming a File on the Disk 56
Editing a File 56
Saving Turing Programs on the Disk 57
Problems 60
Editing Lines Rather than Characters 60
Substituting One String of Characters for Another 61
Problems 61
Redirecting Output to a Disk File 63
Input Data from a Disk File 63
Technical Terms you should now know 64
3. PROBLEMS THAT YOU KNOW HOW TO SOLVE 65
Questions and Answers about Arithmetic Problems 66
Basic Facts about Computer Programming 68
The First Program 69
Problems 70
Labelling Your Computer Results 70
Errors that you might make 71
Problems 72
Questions for Discussion 72
Technical Terms you should now know 74
4. GENERALIZATION 75
Questions and Answers about General Programs 76
Storing Values in the Computer's Memory 77
Labelling Input and Output 81
Problems 82
Real Numbers 83
Assignment Statements and Constants 84
Division of Integers 86
Understandable Programs and Comments 87
Errors that you might make 88
Problems 89
Questions for Discussion 90
Technical Terms you should now know 91
5. BASIC DATA TYPES: INTEGER, REAL, AND STRING 93
Questions and Answers about Data Types 94
Representation of Data Types 95
Strings of Characters 96
Token-oriented Input 98
Strings Can Be Joined 99
Selecting Part of a String 100
Codes for Characters 101
Errors that you might make 102
Problems 103
Questions for Discussion 103
Technical Terms you should now know 104
6. THE ELEMENTS OF PROGRAMMING: REPETITION 105
Questions and Answers about Repetition 106
Looping 107
Testing Programs 110
Labelling of Tables 111
Stopping a Loop 113
Conditions 115
Errors that you might make 116
Questions for Discussion 117
Problems 118
Technical Terms you should now know 119
7. THE ELEMENTS OF PROGRAMMING: COUNTED REPETITION 121
Questions and Answers about Counted Repetition 122
Counted Repetition 123
Doing Without the Counted Loop 126
Counting Backwards and by Steps 127
Problems 127
Graphical Examples of Counted Loops 128
Loops Nested inside Loops 129
Changing the Colors on the Screen 130
How to Repeat a String 131
Problems 133
An Exit in a Counted Loop 133
Errors that you might make 135
Problems 136
Questions for Discussion 137
Technical Terms you should now know 137
8. A SYSTEMATIC METHOD FOR PROBLEM SOLVING 139
A Systematic Method 140
Example Problem to be Solved 141
Tracing the Execution of a Program 144
Satisfying the Problem Specification 146
Another Example of the Systematic Method 147
Problems 151
Questions for Discussion 152
Technical Terms you should now know 152
9. THE ELEMENTS OF PROGRAMMING: SELECTION 153
Questions and Answers about Selection 154
An Example of the Selection Construct 155
Problems 158
Three-way Selection 159
Errors that you might make 162
Problems 162
Nested Selections 164
Another Method for Multi-way Selections 167
User-Friendly Programs 170
Errors that you might make 171
Problems 171
Questions for Discussion 172
Technical Terms you should now know 172
10. DIVIDE AND CONQUER: SUBPROGRAMS 173
Questions and Answers about Subprograms 174
Types of Subprograms 175
Predefined Functions 176
Defining a Function 177
Errors that you might make 179
Problems 180
Predefined Procedures 181
Defining a Procedure 182
Variable Parameters in Procedures 182
Global Variables 184
Versatility and Independence of Subprograms 187
Errors that you might make 188
Problems 188
Questions for Discussion 189
Technical Terms you should now know 189
11. PIXEL GRAPHICS 191
Questions and Answers about Graphics Subprograms 192
Drawing Lines and Boxes 194
Holding Graphics on the Screen 196
Solving a Graphics Problem 197
Errors that you might make 200
Problems 201
Drawing Closed Curves 201
Random Positions 203
Errors that you might make 205
Problems 205
Animation 206
Changing Background Color 208
Errors that you might make 209
Problems 209
Questions for Discussion 210
Technical Terms you should now know 211
12. STRUCTURED DATA TYPES: ARRAY, RECORD, AND FILE 213
Questions and Answers about Structured Data Types 214
Lists 215
Initializing an Array in its Declaration 217
Outputting a List Backwards 217
Sorting a List 218
Sorting by Selection 219
Input and Output with a Disk File 221
Related Lists 224
Frequency Distributions 227
Problems 228
Tables 229
Problems 231
Records 231
Errors that you might make 234
Problems 235
Questions for Discussion 235
Technical Terms you should now know 236
13. SOLVE AN EASY PROBLEM FIRST 237
Questions and Answers about Simplification 238
An Example of Solving an Easy Problem First 239
Solving the Harder Problem 240
Another Example of Solving an Easy Problem First 242
Problems 246
Questions for Discussion 247
Technical Terms you should now know 247
14. MUSIC 249
Questions and Answers about Programming Music 250
Playing Musical Notes 251
Resting for a While 253
Playing a Series of Notes 253
Using the Keyboard to Make Music 254
Animation with Music 255
Problems 259
Questions for Discussion 261
Technical Terms you should now know 261
15. THE STEP-BY-STEP REFINEMENT METHOD OF PROBLEM SOLVING 263
Questions and Answers about Step-by-Step Refinement 264
The Step-by-Step Method 265
An Example of Step-by-Step Refinement 265
Procedures with Global Variables 269
Unfinished Procedures 270
Problems 271
Questions for Discussion 272
Technical Terms you should now know 272
16. SEEKING BETTER SOLUTIONS 273
Questions and Answers on Program Efficiency 274
Solutions that are Very Much Better 275
Binary Search: A Better Solution 276
Better Solutions for Sorting 278
Problems 281
Questions for Discussion 281
Technical Terms you should now know 282
17. PROBLEMS THAT COMPUTERS CAN NOT SOLVE 283
Questions and Answers about Insoluble Problems 284
Computational Complexity 285
Getting Approximate Solutions 286
Making Use of Problems that are Hard to Solve 286
Ethical Problems 287
Ethical Problems about Computers 287
Behaving Ethically about Computers 288
Artificial Intelligence 289
Questions for Discussion 290
Technical Terms you should now know 291
Appendices
1. Simplified Syntax of Turing 293
2. Predefined Subprograms 303
3. Reserved Words in Turing 313
4. Colors in Turing 315
5. IBM PC Keyboard Codes 317
6. Turing Character Set 319
7. Glossary of Technical Terms 323
INDEX 339
[ Holt Software Home ] *
[ Books (Graphical) ] *
[ Books (Text) ] *
[ Top of Page ] *
[ Feedback ]