Instructor's Manual for

M.B. Feldman and E.B. Koffman, Ada 95 Problem Solving and Program Design, 3rd edition. Copyright 1999, Addison-Wesley Publishing Company. All Rights Reserved

Questions and comments to mfeldman@seas.gwu.edu


Chapter 1 Introduction to Computers and Programming

last revised March 1999

Chapter Objectives

The student will
  1. acquire a brief historical background of the development of computers,
  2. be able to outline how the basic parts of a computer work together to solve problems and manipulate data
  3. learn some of the history and philosophy of Ada 95 and the Ada language standard
  4. be introduced to the three main categories of structures introduced in the book--control structures, data structures, and system structures
  5. learn about the general process of writing, compiling, and executing a program in a higher-level language

New Terms

Section 1.1

computer John Atanasoff
ENIAC John von Neumann
stored-program computer late 1930s
computer program 1946
minicomputer microcomputer
mainframe supercomputer
workstation computer networks

Section 1.2

input device hardware
secondary storage central processor unit (CPU)
memory address output device
computer terminal memory cells
keyboard control unit
hard-copy output monitor
main memory data files

Section 1.3

problem solving problem specification
problem inputs problem outputs
constraints simplifying assumptions

Section 1.4

operating systems application programs
software development tools

Section 1.5

software development method specification
analysis design
test plan coding
implementation testing
refinement divide and conquer
control structures sequence
repetition selection
predictable performance

Section 1.6

programming languages higher-level language
assembly language machine language
binary string binary string
Fortran COBOL
Pascal Ada
C C++
portability compiler standard

Section 1.7

control structures data structures
system structures standard
Ada Reference Manual (RM)  

Section 1.8

logging on control language
timeshared computer personal computer
booting program and data files
source file editor program
compiler program compilation error
object file linker program
binder program load file
executable image loader program

Section 1.9

listing file syntax errors
semantic errors

Section 1.10

compilation errors run-time errors
logic errors

Notes and Suggestions

General Suggestions

This chapter has been heavily reorganized from earlier editions, to provide a more coherent introduction to computers and the whole process of software development. For students with some previous experience in computers, sections 1.1, 1.2, and 1.3 can be assigned as background reading. Section 1.7 covers some Ada history and concepts. Sections 1.8 and 1.9 provide a valuable first experience in compiling a program.

I thought I'd pass on some of my experiences and adventures. The course I teach using this book is a CS1-level course that requires no previous programming background. Students take it in their second semester, after a first-semester orientation course that covers all the engineering disciplines and teaches some basic computer skills, but no programming per se. I survey my students in their first week of classes, to learn the demographics of my group. Students must complete a simple survey form and e-mail it to me and to the lab asssistant. From these surveys, I know that in a typical offering of this course, roughly fifty percent of the students have no programming background.

Students without prior experience, especially female ones, often lack confidence and feel overwhelmed at the start, swamped with terminology and acronyms and other abbreviations. (The male students may be equally overwhelmed, but are less prone to admit it.) They preface their questions with something like "I know this is a stupid question, but..." One of my favorite sayings is "inexperience is not equivalent to stupidity"--I repeat it often during the first half of this course. In the book, I've included some stories about naive computer users, otherwise intelligent and educated people who make humorous assumptions in their use of computers. How were they to know otherwise?

An example is the story from the technical support group in a large company, describing a user who called to complain about a broken "cup holder" on his PC. Asked to describe this "cup holder," the user said it slides out from the PC and says "4X" on the front. This user, confusing the CD-ROM tray with the cup holder in his car, had set down a heavy bug of coffee and broken the tray off. How was he to know otherwise?

I've also starting collecting and showing comic strips from the daily press about peoples' trials and tribulations with computers. It fascinates me that there is so much material in the dailies about computers and the Internet; it's an indication of how pervasive computers are now, and a leap of faith that lay readers will understand the jargon. A while ago, "Cathy" tried to buy a computer, and went through an exaggerated version of every crazy experience we've ever had in computer stores. It was hilarious; the students were really eager to see the next installment at the beginning of each class.

We are not born learning everything; the students are taking an introductory computing course precisely to learn things they did not know already. While this may seem obvious, teachers and students alike tend to forget this principle. Try to give the students confidence that they can succeed in this, and even though they feel swamped at the start, at the end they will be amazed at how much they've accomplished. Let them know you understand that the terminology is forbidding at first, and that you are on their side in guiding them through the thicket.

Section 1.1

It is never too early to start emphasizing that, while in the computing milieu we tend to focus much attention on differences between computers, languages, and so on, there is much that is fundamental and similar. An educated computing professional must try to understand both the similarities and the differences, and distinguish that which is fundamental from that which is only a detail of an operating system or language.

Section 1.3

The student should understand that such tools as compilers, editors, linkers, and loaders are just programs which process the text of other programs. I'm reminded of a certain purchasing official who asked me once whether a compiler was a large piece of equipment. How was he to know otherwise?

Sections 1.4 and 1.5

These sections introduce some terminology that is used in the sequel, especially the steps in the Software Development Method used throughout the book. You should point out that this method is similar to that used in industry to develop "real" systems. A software project is much more than just a program, and while the projects to be assigned in the course are "small," it is expected that they will understand and provide all the elements of a real project, not just a source listing. This comes as a bit of a shock to students who have done programming in high school. In my course the grade curves at mid-semester and at the end typically show similar distributions for experienced and inexperienced students. The combination of Unix, Ada, and the Software Development Method seems to level out the experience differences; none of these are usually taught in high school!

The Case Study in section 1.5 motivates the need for selection and repetition control structures. Ask the students to work through algorithms for everyday experiences like cooking, knitting, or even dressing in the morning. They do not, of course, know how to translate these algorithms into programs. They will be ready for the corresponding program structures once they understand that the structures are not arbitrary but fill an obvious problem solving need.

Section 1.7

Students may wish to know why you are teaching Ada, and where it is used. To answer the first question, point out that Ada is a very good language for learning modern system construction and is not especially hard to learn. Because the Ada standard is so closely followed by compiler developers, students' investment in learning Ada will be rewarded when they can move their programs and knowledge to nearly any available computer. This is especially useful where some students own personal computers: If their projects avoid platform-specific libraries like graphics, they can move programs freely between their own computers and the ones in the lab.

In answer to the second question, explain that Ada is in very wide use now in the defense sector for which it was designed, but also many companies are choosing Ada for nondefense applications as diverse as robotics, air traffic control, investment management, airliner controls, and communication satellites. Here is a list of non-defense projects known to be using Ada:

Air Traffic Control Systems, by country
Banking and Financial Networks
Commercial Aircraft
Communication and Navigational Satellites and Receivers
Data Communications
Scientific Space Vehicles
Railway Transportation
Television Industry
Medical Industry
Heavy Industry