![]() |
Introduction to Programming in Turing |
| Title: | Introduction to Programming in Turing (First Edition) |
| Author: | J.N.P. Hume |
| ISBN: | 0-921598-42-4 |
| Publisher: | Holt Software Associates Inc. |
| Binding: | Softcover |
| Pages: | 480 pgs |
| Price: | Bookstores & Schools: $32.00 Retail: $40.00 |
| Ordering Information: | For bookstores and schools, click here for
ordering information. For individuals click here for ordering information. |
| Program Examples: | Available [Click here for information on obtaining program examples found in Holt Software publications.] |
| Solutions Manual: | Available [Click here for information on obtaining Solutions Manuals for Holt Software publications.] |
An Introduction to Programming in Turing focuses on computing concepts with the ultimate goal of facilitating the broadest possible coverage of the core computer science curriculum. It emphasizes programming within the larger context of computer science and computer science within the context of problem solving and design. This text begins with the basic programming concepts such as repetition and selection and progresses to advanced topics such as arrays, subprograms, records, and binary files. It also includes student motivators such as graphics, music, and GUIs.
Each chapter provides support for students with example programs and numerous exercises. All example programs used in the textbook are also available with the software and on-line.
It is envisioned that a grade 9 course would cover the first nine chapters of the Introduction to Programming in Turing, a grade 10 course, the first fourteen chapters and a grade 11 or college course would cover the entire book.
Note that while this book uses the Object Oriented Turing software, it does not cover Object Oriented Programming at all. Those interested in teaching Object Oriented Programming should look at Programming: Concepts and Paradigms which covers the topic in depth.
If you have Adobe Acrobat Reader installed, then click on the link below. If you do not have Acrobat Reader, then you can obtain it free of charge by clicking the Get Acrobat Reader icon.
Introduction to Programming in Turing focuses on computing concepts with the ultimate goal of facilitating the broadest possible coverage of the core computer science curriculum.
The programming language used in this book is Turing (OOT), which has an easy-to-learn syntax and is supported by student-friendly programming environments. By learning the fundamentals of programming using a language that does not intrude with a difficult syntax, students can make a relatively easy transition to any one of the currently popular object-oriented languages such as C++ or Java.
The list of chapter titles outlines the arrangement of materials.
Chapter 1 provides an overview of the history of modern computing, including hardware, software, programming languages, and number systems. By highlighting a number of key technological developments, it attempts to place Computer Engineering today in its scientific and social context. It also explores some of the current issues in computing such as employment, privacy, and access to information.
Chapter 2 describes how to use the Turing environment. The chapter also covers how syntax errors are reported and how they are corrected.
Chapter 3 introduces some of the key ideas in computer science. It explains the process of programming and provides suggestions for good programming style. It also introduces important design concepts such as the software lifecycle.
Chapter 4 introduces programs that consist of a single line. Arithmetic operations for both integers and real numbers are illustrated. Labels are shown to improve the understandability of results that are output. Programs of several lines are used to output a series of lines.
Chapter 5 shows how declarations are used to prepare locations in memory for storing information. Strings and numbers are input to set values of variables. The use of constants and comments to improve the program understandability is illustrated. Prompts are also introduced as a way of informing users what is expected of them.
Chapter 6 introduces the repetition control structure used in structured programming. Both counted and conditional loops are discussed. The exit condition is explained in terms of providing a means for exiting from any point within the loop. Random integers are generated to control loop termination.
Chapter 7 shows how characters can be positioned in the Execution window to create various patterns. Manipulation of character colors and background colors is also demonstrated. The use of drawing and erasing a pattern to achieve the illusion of animation is also introduced.
Chapter 8 explains how to create graphics by plotting in pixel positions in the Execution window. The instructions for plotting points, lines, ovals, and arcs to allow the creation of simple line graphics is illustrated. Graphics with colored backgrounds, closed curves filled with color and sound are also explored.
Chapter 9 introduces the selection construct. Two-way, three-way, and multi-way selection are investigated. The case construct is presented as an alternative to the if..then..elsif..else structure for programming multi-way selection.
Chapter 10 shows how to redirect a program's output to a disk file rather than or in addition to displaying it in the Execution window. Using the disk file to provide input to a program is also explained and using the end-of-file automatically placed at the end of any disk file is introduced. Reading of lines of text from the disk is shown as an alternative to token-oriented input of string data.
Chapter 11 outlines methods to: find the length of a strong, join strings together, locate a substring, search for a pattern in a string, replace one pattern with another, and eliminate characters or patterns from strings. A method of preventing improper input to a program from causing a program crash is shown.
Chapter 12 summarizes various ways of inputting text material from a file by token, line, or number of characters. Ways of handling multiple files directly in a program rather than by redirection are shown. Text formatting is described and a simple example of language translation is programmed.
Chapter 13 presents flow charts for the three basic control structures used in structured programming: linear program flow, repetition, and selection. Charts for nesting of structures and multi-way selection are also shown. The scope of declarations of variables and constants is discussed. Top-down program design is outlined.
Chapter 14 defines the declaration of the array type. The use of arrays is discussed with examples for sorting lists. The datatypes: subrange, boolean, and named are given with examples of their use. Two-dimensional arrays are illustrated by tables.
Chapter 15 describes how to play musical notes, both individually and as a series. Arranging the music to accompany graphic animation in the Execution window is illustrated.
Chapter 16 introduces the two types of Turing subprograms: functions that produce a value and procedures that produce some action. Both predefined and user-created examples of these two types of subprograms are presented. The notion of parameters, both value and variable, are explained. Type transfer functions and recursive subprograms are introduced.
Chapter 17 shows how both functions and procedures can have parameters that are of array type. The correspondence between formal and actual parameters is presented and the idea of dynamic formal parameters for arrays introduced. Local and global variables are differentiated.
Chapter 18 describes the declaration, input, and output for the data type record. Arrays and files of records are presented and the movement of records in memory is explained. Text and binary files are contrasted and the way that random access to records on disk is obtained is described. An example of maintaining a binary file of records is presented.
Chapter 19 introduces binary search as an efficient method of searching in a sorted file. The method of sorting by merging is detailed . Files stored as linked lists of records are described and an example of a highly interactive graphic is presented.
Chapter 20 examines programs for pixel graphic examples that require the use of more complex mathematics or subprograms with array parameters. Animation using a buffer is shown. Methods of displaying statistical information in a graphical format such as a pie or bar chart are given. Mathematical functions are plotted.
Chapter 21 shows programs involving animation requiring interaction with the mouse. Two advanced animation techniques are described. These include use of the Pic and Sprite modules available in the OOT library of predefined modules. Another module which facilitates the creation of graphical user interface (GUI) elements such as input boxes and buttons, as well as sound with animation, is introduced.
Differing course demands and student populations may require instructors to omit certain chapters or parts of chapters, or to insert additional material to cover some concepts in greater detail. For example, instructors wishing to address the historical information in Chapter 1 after students have more hands-on programming may choose to begin with a later chapter.
The Turing language was first developed in 1982 in response to the need for a programming notation that incorporates good structuring methods, supports a correctness approach, is easy for the student to learn, and is suited to interactive programming. This language has gained considerable acceptance as a teaching medium.
The Turing language has undergone extensive enhancement, in terms of both software support and language notation, since its inception. In 1992 a superset of Turing, called Object Oriented Turing (OOT) was created by adding a number of features including objects, classes, and inheritance.
The programming environment for Turing is particularly helpful for the learning student. It provides good diagnostic messages for syntax errors and run-time errors. It provides strong run-time checking, with automatic detection of uninitialized variables and dangling pointers. It supports an on-line manual (lookup of language features by a button press), a directory browser, and, in the advanced mode, multi-window editing. Versions of the environment allow the student to use a wide variety of hardware platforms and operating systems.
Once programming concepts have been learned in Turing, it is relatively easy to transfer these ideas to new situations. In particular, data structuring, algorithms, and object-orientation learned using OOT transfer directly to industrial systems such as C++ and Java.
J.N.P. Hume
University of Toronto