Spider | Previous | Next | Full Table of Contents | Index | Program List | Copyright

Ada 95 Problem Solving and Program Design

M. B. Feldman and E. B. Koffman

Table of Contents

Preface

Chapter 1
Introduction to Computers and Programming

1.1 Electronic Computers Then and Now
1.2 Components of a Computer
1.3 Problem Solving and Programming
1.4 The Software Development Method
1.5 Programming Languages
1.6 Processing a High-Level Language Program
1.7 Using an Operating System
Chapter Review

Chapter 2
Introduction to Ada 95

2.1 About Ada
2.2 The "Look" of Ada Programs
2.3 System Structures: Numerical Input and Output
2.4 Data Structures: Declaring Constants and Variables
2.5 System Structures: General Form of an Ada Program
2.6 Problem Solving: Software Development Illustrated
2.7 Control Structures: Assignment Statements
2.8 Control Structures: Input/Output Statements
2.9 Programs in Memory
2.10 Data Structures: Introduction to Data Types and Expressions
2.11 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 3
Problem Solving and Using Packages

3.1 Problem Solving: Building Programs from Existing Information
3.2 Problem Solving: Extending a Problem Solution
3.3 Problem Solving: Structured Programming
3.4 Data Structures: Introducing Enumeration Types
3.5 System Structures: The Importance of Packages
3.6 System Structures: Using Ada's Calendar Package
3.7 System Structures: Using a Screen Control Package
3.8 Continuing Saga: Introducing the Spider
3.9 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 4
Decision Statements; Writing Simple Functions and Packages

4.1 Control Structures: Boolean Expressions and the IF Statement
4.2 Problem Solving: Decision Steps in Algorithms
4.3 Tricks of the Trade: Tracing a Program or Algorithm
4.4 Problem Solving: More Strategies
4.5 Control Structures: The Multiple-Alternative IF Statement
4.6 System Structures: Using Ada's Math Library
4.7 System Structures: Writing Simple Functions
4.8 System Structures: Writing a Simple Package
4.9 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 5
Repetition in Programs

5.1 Control Structures: Counting Loops and the FOR Statement
5.2 Problem Solving: Generalizing a Solution
5.3 Problem Solving: Repeating a Program Body
5.4 Control Structures: Nested Loops
5.5 Continuing Saga: Nice Spider Patterns
5.6 Data Structures: Subtypes of Scalar Types
5.7 Tricks of the Trade: Debugging and Regression Testing
5.8 System Structures: A Useful Functions Package and the Overloading Principle
5.9 System Structures: Introduction to Exception Handling
5.10 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 6
Other Loop Forms; Procedures; Exception Handling

6.1 Control Structures: the WHILE Statement
6.2 Problem Solving: Loop Design
6.3 Problem Solving: Assertions and Loop Invariants
6.4 Control Structures: the General LOOP and EXIT Statements
6.5 System Structures: Robust Exception Handling
6.6 System Structures: Writing Simple Procedures
6.7 System Structures: A Package for Robust Input
6.8 Continuing Saga: a Child Package for the Spider
6.9 Tricks of the Trade: Testing with Exception Handling
6.10 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 7
A Systematic Look at Scalar Data Types

7.1 Data Structures: Numeric Data Types
7.2 System Structures: More on Ada.Numerics; the USE clause
7.3 Continuing Saga: Random Numbers and the Drunken Spider
7.4 Data Structures: The Boolean Type
7.5 Data Structures: The Character Type
7.6 Control Structures: The CASE Statement
7.7 Continuing Saga: Inside the Spider Package
7.8 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 8
Composite Types: Records and Arrays

8.1 Data Structures: Record Types
8.2 Control Structures: Records as Operands and Parameters
8.3 System Structures: A Package for Calendar Dates
8.4 Data Structures: Hierarchical Records
8.5 Data Structures: Array Types
8.6 Problem Solving: Selecting Array Elements for Processing
8.7 Problem Solving: Using Arrays
8.8 Problem Solving: Reading Part of an Array
8.9 Data Structures: Arrays with Noninteger Subscripts
8.10 Problem Solving: Searching and Sorting an Array
8.11 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 9
Strings and Files

9.1 Data Structures: the String Data Type
9.2 System Structures: String Packages in Ada 95
9.3 System Structures: a Systematic View of Text Files
9.4 Problem Solving: Operating System Redirection of Standard Files
9.5 Problem Solving: Getting Input Values from a String
9.6 System Structures: Reading Command Parameters
9.7 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 10
Programming with Objects: Abstract Data Types

10.1 System Structures: Abstract Data Types (ADTs)
10.2 System Structures: Using Ada.Calendar as an ADT
10.3 System Structures: Writing an ADT for Dates
10.4 System Structures: Writing an ADT for Money Quantities
10.5 System Structures: Writing an ADT for Employee Records
10.6 Continuing Saga: Writing an ADT for Multiple Spiders
10.7 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 11
Introduction to Unconstrained Array Types and Generics

11.1 Data Structures: Unconstrained Array Types
11.2 Problem Solving: a General Sorting Program
11.3 System Structures: Generic Units
11.4 Problem Solving: a Generic Sorting Program
11.5 System Structures: a Generic Sets Package
11.6 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 12
Multidimensional Arrays and Variant Records

12.1 Data Structures: Multidimensional Arrays
12.2 Problem Solving: Using Multidimensional Arrays
12.3 Continuing Saga: Keeping Track of Multiple Spiders
12.4 Data Structures: Variant Records
12.5 System Structures: Geometric Figures
12.6 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 13
Recursion

13.1 Problem Solving: The Nature of Recursion
13.2 Tricks of the Trade: Tracing a Recursive Function
13.3 Problem Solving: Recursive Mathematical Functions
13.4 Problem Solving: More Recursive Programs
13.5 Problem Solving: More Case Studies in Recursion
13.6 Problem Solving: Recursive Searching
13.7 Tricks of the Trade: Common Programming Errors
Chapter Review

Chapter 14
Access Types and Dynamic Data Structures

14.1 Data Structures: Access Types and the NEW Operator
14.2 Data Structures: Singly Linked Lists
14.3 Data Structures: Linked Lists with Head and Tail Pointers
14.4 Problem Solving: Ordered Insertions in Linked Lists
14.5 System Structures: A Generic Version of the Linked-List Package
14.6 Problem-Solving: Stacks and Queues
14.7 Tricks of the Trade: Debugging Programs with Linked Lists
Chapter Review

Chapter 15
Programming with Objects: Tagged Record Types

15.1 System Structures: Object-Oriented Programming
15.2 System Structures: Tagged Types
15.3 Data Structures: General Access Types
15.4 System Structures: Class-wide Types
15.5 System Structures: Dynamic Dispatching
15.6 Heterogeneous Linked Lists
Chapter Review

Chapter 16
Introduction to Concurrent Programming

16.1 Problem Solving: What is Concurrent Programming?
16.2 System Structures: Task Types and Task Objects
16.3 System Structures: Protected Types and Protected Objects
16.4 Continuing Saga: Multiple Concurrent Spiders
Chapter Review

Appendix A: The Ada Character Set, Delimiters, and Reserved Words

Appendix B: Ada 95 Syntax Rules

Appendix C: The Ada Predefined Language Environment

Appendix D: Specification of the Package Ada.Text_IO

Appendix E: Specification of the Package Ada.Calendar

Appendix F: Specification of the Ada Math Libraries

Appendix G: Specification of the Ada String Libraries Used in this Book

Appendix H: Summary of Ada Execution-Time Exceptions

Appendix I: Ada Hints for Pascal Users


Spider | Previous | Next | Full Table of Contents | Index | Program List | Copyright

Copyright ©1996 by Addison-Wesley Publishing Company, Inc.