[Book Cover]



Introduction to Engineering Programming :

in C, MATLAB and JAVA

ISBN : 0-471-00116-3

Mark Austin

Civil Engineering and ISR, University of Maryland

David Chancogne

ISR, University of Maryland

PART 1 : ENGINEERING COMPUTATIONS TUTORIAL

  • Chapter 1 : Introduction to Engineering Computations

    • Applications of Computers in Engineering
    • Recent Advances in Computing : A Little History
    • Computer Hardware Concepts
    • Operating System Concepts
    • Computer Networking Concepts

      • Client-Server Network Architectures
      • The Internet
      • Internet Access
      • Protocols for Communication on the Internet
      • Internet Domain Names/Addresses
      • Internet Services
      • The World Wide Web
      • WWW Search Engines and Robots

    • Review Exercises

  • Chapter 2 : Principles of Engineering Software Development

    • Hardware-Software Life-Cycle
    • Principles of Engineering Software Design

      • Small and Large Computer Programs
      • Models of Software Systems Development
      • Components of Software Systems Development
      • Modular Program Development
      • Abstraction
      • Top-Down and Bottom-Up Software Design

    • Computer Programming Language Concepts

      • High- and Low- Level Computer Languages
      • Compiled and Interpreted Programming Languages
      • Procedural and Object-Oriented Programming Languages
      • Database and Scripting Languages
      • Hypertext/Virtual Reality Markup Languages (HTML/VRML)

    • Programming Language Selection


PART 2 : C PROGRAMMING TUTORIAL

  • Chapter 3 : Getting Started

    • Introduction -- Key Features of C
    • A Little History
    • Writing and Compiling a Simple C Program

      • User-Defined Code and Software Libraries
      • Program Development Cycle

    • Program 3.1. Print Approximate Value of PI

      • Problem Statement and Source Code
      • Comment Statements
      • Layout of Program Source Code
      • The main() function
      • Header files and the C Preprocessor
      • Symbolic Constants
      • Standard Output with printf()

    • Program 3.2. Compute and Print Area of Circle

      • Problem Statement and Source Code
      • Keywords in C
      • Basic Data Types
      • Declaring Variables
      • Standard Input with scanf()
      • Arithmetic Expressions
      • Assignment Statements
      • Program Flow and Control

    • Compiling and Running Small C Programs

      • Compiling Small C Programs
      • Optional Compiler Arguments
      • Linking Software Libraries to Program Object Code
      • Redirection of Standard Input and Output

    • Programming Guidelines

      • Vertical Layout
      • Braces
      • Indents

    • Programming Exercises

  • Chapter 4 : Basic Data Types and Variables

    • Basic Data Types in C
    • Characters

      • Defining Character Variables in C
      • Program : C Program containing Variables
      • Character Constants
      • Escape Characters

    • Integers

      • Short and Long Integers
      • Unsigned Integers
      • Integer Constants

    • Single and Double Precision Floating Point Numbers

      • Program : Print Size of Basic Data Types

    • Enumeration Data Types

      • Program : Print Days of the Work Week and Weekend
      • Use of Magic Numbers

    • Variable Attributes : Type, Address, Name and Value

      • Program : Print Storage of Basic Data Types

    • Variable Naming Conventions
    • Programming Exercises

  • Chapter 5 : Operators and Expressions

    • Arithmetic Operators and Expressions
    • Assignment Operations
    • Increment/Decrement Operators

      • Program : Demonstrate Pre- and Post-Increment Operators

    • Arithmetic Expressions and Precedence

      • Program : Resistors in Parallel

      • Program : Using Horner's Rule to Evaluate a Polynomial

    • Mixed Expressions and Data Type Conversions
    • Bitwise Operations and Applications

      • Program : Print Bits in a Character

    • Subtractive Cancellation

      • Program : Simulate Subtractive Cancellation

    • Programming Exercises

  • Chapter 6 : Control of Flow

    • Introduction to Control of Flow
    • Relational and Logical Operations

      • Relational Operators
      • Logical Operators

    • Selection Constructs

      • If and if-else Statements
      • The If-Else Statement
      • Chained (and nested) if-else clauses
      • Tertiary Condition Operator
      • Switch Statement

    • Iteration Constructs

      • The while statement
      • The do-while statement
      • The for statement
      • Break and Continue Statements

    • Comparison of Looping Constructs
    • Programming Exercises

  • Chapter 7 : Functions I

    • Introduction to Functions

      • User-Defined and Library Functions

    • What Functions are Required in a C Program?
    • Writing User-Defined Functions

      • Function Declarations
      • Filling in User-Defined Functions

    • Case Study Program : Quadratic Equation Solver

      • Program : Compute Roots of Quadratic Equation

    • Call by Value Mechanism for Function Calls

      • Program : Demonstrate Call by Value Mechanism

    • Scope and Storage of Variables and Functions

      • Scope of Variables in a One File C Program
      • Program : Scope of Variables in a One File Program
      • Scope of Variables in a Two File C Program
      • Program : Scope of Variables in a Two File Program

    • Packaging of Program Modules
    • Math Library Functions

      • Program : Demonstrate Functions in Math Library

        Programming Exercises

  • Chapter 8 : Arrays and Pointers

    • Need for Arrays and Pointers
    • Introduction to Arrays

      • Definition of Arrays
      • Array Indexing

    • Initializing the Contents of an Array

      • Initialization Lists
      • Explicit Array Initialization
      • Static Allocation

    • Character Arrays
    • Applications of 1-Dimensional Arrays

      • Program : Profile of Cable in Simple Suspension Bridge
      • Program : Generate and Print Random Numbers

    • Multi-dimensional Arrays

      • Patterns of Storage for Multi-dimensional Arrays

    • Application of 2-Dimensional Arrays

      • Program : Distribution of Temperature in Chimney Cross Section

    • Pointers

      • Motivation and Need for Pointers

    • Pointer Attributes : Type, Address, Name, Value, and Indirect Value

      • Program : Initialize and Print a Pointer
      • Program : Print Size of Pointers
      • Program : Demonstrate Pointers to Pointers

    • Pointer Arithmetic

      • Program : Pointer Arithmetic for floats

    • Relationship between Pointers and Arrays

      • Program : Exercise Pointers and Character Arrays
      • Program : Print 2-Dimensional Array

    • Programming Exercises

  • Chapter 9 : Functions II

    • Introduction to Advanced Functions
    • Pointers as Function Arguments

      • Program : Use Pointers to Swap Variables

    • Arrays as Function Arguments

      • Program : Passing One-Dimensional Arrays to Functions
      • Program : Passing Multi-Dimensional Arrays to Functions

    • String Functions

      • Program : Allocation Of String Function Arguments
      • Program : Exercise String Functions in Standard Library

    • Programming Exercises

  • Chapter 10 : Dynamic Allocation of Memory

    • Need for Dynamic Memory Allocation
    • Memory Allocation with malloc(), calloc(), and realloc()
    • Deallocating Memory with free()
    • Dynamic Allocation of Character Strings

      • Program : Allocation of Character Strings with saveString()

    • Generic Functions for Dynamic Memory Allocation
    • A file of Miscellaneous Functions

      • Program : Functions for Dynamic Memory Allocation

    • Dynamic Allocation of One-Dimensional Arrays

      • Program : Exercise Vector Functions

    • Dynamic Allocation of Two-Dimensional Arrays

      • Program : Allocate and Print Small General Matrices
      • Program : Free Matrix Memory

    • Programming Exercises

  • Chapter 11 : The C Preprocessor

    • Introduction to the C Preprocessor
    • Compiling Multiple File C Programs
    • Capabilities of the C Preprocessor

      • File Inclusion
      • Macro Substitution and Templates
      • Macros with Arguments

  • Chapter 12 : Input and Output (I/O)

    • Basic Concepts

      • Streams

    • Using printf() for Buffered Output

      • Use of Escape Characters in Output
      • Formatting Options for Conversion Specifications

    • Using scanf() for Buffered Input

      • Scanning Multiple Lines of Input
      • Flushing the stdin and stdout Buffers

    • File Input/Output (I/O)

      • Opening and Closing Files
      • Functions fprintf() and fscanf()
      • Functions fgetc() and fputc()

    • Program : Statistics of Weekly Rainfall

      • Problem Statement and Source Code
      • Histogram of the Rainfall Data
      • Storing the Rainfall Data
      • Sending the Program Output to a File

    • Reading Datasets from an Input File

      • Reading Datasets of Known Size
      • Reading Datasets of Unknown Size
      • Reading Datasets via Standard Input

    • Program : Memory Reallocation for Datasets

      • Problem Statement and Source Code
      • Reading and Storing the Dataset File

    • Programming Exercises


PART 3 : MATLAB PROGRAMMING TUTORIAL

  • Chapter 13 : Programming in MATLAB

    • Getting Started

      • Professional and Student Versions of MATLAB
      • Entering and Leaving MATLAB
      • On-line help

    • Variables and Variable Arithmetic

      • Defining Variables
      • Arithmetic Expressions
      • MATLAB Output
      • Built-in Mathematical Functions
      • Program Input and Output

    • Matrices and Matrix Arithmetic

      • Definition and Properties of Small Matrices
      • Reading and Saving Datasets
      • Application of Mathematical Functions to Matrices
      • Colon-Notation
      • Sub-matrices
      • Matrix Arithmetic
      • Matrix-Element Level Operations

    • Control Structures

      • Logical Expressions
      • Selection Constructs
      • Looping Constructs

    • General Purpose Matrix Functions

      • Sorting the Contents of a Matrix
      • Summation of Matrix Contents
      • Maximum/Minimum Matrix Contents
      • Random Numbers

    • Program Development with M-files

      • Script M-files
      • Function M-files
      • Program : Square Root Calculation
      • Program : Statistics of Experimental Data

    • Engineering Applications

      • Program : Temperature Conversion Program
      • Program : Free Vibration Response of Undamped SDOF System
      • Program : Compute Roots of Quadratic Equation
      • Program : Statistical Analysis of Experimental Data

    • Programming Exercises

  • Chapter 14 : MATLAB Graphics

    • Simple 2-D Plotting

      • Histograms, Bar Charts, and Stem Diagrams
      • Multiple Plots

    • Three-Dimensional Plots
    • Mesh and Surface Plotting
    • Contour Plots
    • Sub-Plots
    • Hard copies of MATLAB Graphics
    • Preparing MATLAB Graphics for the World Wide Web
    • Programming Exercises

  • Chapter 15 : Solution of Linear Matrix Equations

    • Systems of Linear Matrix Equations

      • Definition of Linear Matrix Equations
      • Geometry of Two and Three-dimensional Systems
      • Hand Calculation Procedures
      • Types of Solutions for Systems of Linear Matrix Equations

    • Case Study Problem : 3 Linear Matrix Equations
    • Singular Systems of Matrix Equations
    • Engineering Applications

      • Program : Structural Analysis of a Cantilever Truss
      • Program : Analysis of Electrical Circuit
      • Program : Least Squares Analysis of Experimental Data
      • Program : Distribution of Temperature in Chimney Cross Section

    • Programming Exercises


PART 4 : JAVA PROGRAMMING TUTORIAL

  • Chapter 16 : Introduction to Java

    • Java -- A Little History

      • How Everything Got Started

    • The ``Famous'' Java Buzzwords

      • Simple
      • Object-Oriented
      • Network Savvy (distributed)
      • Interpreted
      • Robust
      • Secure
      • Architecture Neutral
      • Portable
      • High Performance
      • Multithreaded
      • Dynamic

    • Java and the Internet

      • Java Applet Programs
      • Java Applets and HTML Documents
      • Applet Tags and Parameters

    • Review Questions

  • Chapter 17 : Object-Oriented Program Design

    • Fundamental Concepts

      • Principle of Abstraction
      • Need for Software Reuse

    • Object-Oriented Software Development

      • Encapsulation
      • Relationships among Classes
      • Polymorphism

    • Is Java Object-Oriented?
    • Review Exercises

  • Chapter 18 : The Java Language

    • Getting Started

      • Java Platform Requirements
      • Java Development Kit (JDK)

    • Program 18.1. "Peace On Earth" Stand-alone Program

      • Problem Statement and Source Code
      • Compiling and Running the Program
      • Comment Statements
      • Identifiers and Reserved Words
      • Layout of Program Source Code
      • Objects and Classes
      • The main() method
      • Output with System.out.println()

    • Program 18.2. "Peace On Earth" Java Applet Program

      • Problem Statement and Program Source Code
      • Program Source Code
      • The init() method
      • The HTML file
      • Compiling and Running the Program

    • Primitive Data Types
    • Java Variables

      • Declaring a Variable
      • Variable Modifiers
      • Constants
      • No Global Variables
      • Casting of Variables

    • Expressions

      • Arithmetic Expressions
      • Logical and Relational Expressions

    • Control Statements

      • Selection Constructs
      • Looping Constructs
      • Exception Handling Constructs

    • Classes and Objects

      • Creating an Object
      • Accessing Object Data
      • Using Constructor Methods for Object Creation
      • Subclass and Inheritance
      • Abstract Methods and Classes
      • Scoping

    • Class Libraries and Methods

      • Package and Import Statements
      • Import Statements
      • Class Libraries in Development
      • Using Class Methods

    • Arrays
    • Program 18.3. Compute Roots of Quadratic Equation

        Problem Statement
      • Program Modules and Class Hierarchy
      • Program Source Code
      • Compiling and Running the Program
      • Program Architecture
      • Import Statements
      • String Objects
      • Scope of Variables
      • Handling Input from the Keyboard
      • Converting Strings to Numbers
      • Arithmetic Expressions
      • Input and Output Streams
      • Overloading the + operator

    • Program 18.4. Point and Line Segment Operations

      • Problem Statement
      • Program Modules and Class Hierarchy
      • Program Source Code
      • Compiling and Running the Program
      • Program Architecture
      • Constructor Methods

    • Programming Exercises

  • Chapter 19 : Java Graphics

    • Introduction
    • The Java Abstract Windowing Toolkit (AWT)

      • AWT Packages
      • AWT Class Hierarchy

    • AWT Components and Containers

      • Windows and Frames
      • Program : A Frame that has no Functionality
      • Applets

    • AWT Graphics

      • Graphics Coordinate System
      • Graphics Objects and Methods
      • Polygon
      • Color
      • Font and FontMetrics

    • AWT Layout Managers

      • Border Layout
      • Flow Layout
      • Grid Layout

    • AWT I/O Components

      • Label
      • Button
      • Choice Boxes (Drop-Down Lists)
      • Lists
      • Text Fields and Text Areas
      • Canvases
      • Panels

    • Handling AWT Events

      • Delegation Model of Event Handling
      • Event Class Hierarchy
      • Working with Event Listeners
      • Program : Demonstrate Button Listeners
      • Adapter Classes

    • Engineering Applications

      • Program : Temperature Conversion Program
      • Program : Free Vibration Response of Undamped SDOF System
      • Program : Simple ``Draw'' Applet

    • Programming Exercises


PART 5 : APPENDICES

  • Appendix 1 : Introduction to UNIX

    • Directory Structure and File Handling
    • Operating System Commands

  • Appendix 2 : The Standard Library

    • Errors -- <errno.h>
    • Limits -- <limits.h> and <float.h>
    • Common Definitions -- <stddef.h>
    • Diagnostics -- <assert.h>
    • Character Handling -- <ctype.h>
    • Localization -- <locale.h>
    • Mathematics -- <math.h>
    • Nonlocal jumps -- <setjmp.h>
    • Signal Handling -- <signal.h>
    • Variable Arguments -- <stdarg.h>
    • Input/Output -- <stdio.h>
    • General Utilities -- <stdlib.h>
    • String Handling -- <string.h>
    • Date and time -- <time.h>

  • Bibliography
  • Index

Developed in November, 1998, by Mark Austin
Copyright © 1998-1999, Mark Austin and David Chancogne