A Beginners C++
The table of contents given below includes links to additional materials. Some complete chapters, and various subsections, are available either as Postscript files or directly readable "html" text. There are also links to a couple of files with example code. The code should be usable with the Borland development environment for the PC, or Symantec-8 for the Macintosh.
To save space and transmission time, many of the Postscript files have been compressed. The files were compressed using gzip on Unix. You have to uncompress them (gunzip) before viewing them with ghostview or sending to a printer. (If you go to Javaworld you will usually find that they have dowloadable copies of gzip utilities for both Mac and PC available on their page. The links are at the bottom after their stories about Java developments.) (If you need a viewer for postscript, try: University Wisconsin, ghostscript, ghostview, gs page )
Part 1 Introduction to Computers
Computer HardwareCPU and instructions
Memory and Data
Bus
Peripherals
Disks and tapes
Other I/O devices
click the below link to download chapter 1
http://www.uow.edu.au/~nabg/ABC/C1.pdf
Programs: Instructions in the Computer
Programming with bits!
Loaders
Assemblers
Coding in assembly language
From Assembly Language to "High Level" languages
click the below link to download second chapter
http://www.uow.edu.au/~nabg/ABC/C2.pdf
Operating Systems
Origins of "Operating Systems"
Development of Operating Systems: Multiprogramming* Timesharing* File Management* Virtual Memory* "Spooling"* Late 1960s early 1970s system* Networking*
Modern systems: UNIX* Macintosh OS*
click the below link to download third chapter
http://www.uow.edu.au/~nabg/ABC/C3.pdf
Why have "high-level" languages?
Limitations of Assembly Language and Origins of High Level Languages
High level languages constructs: Statements* Data types and structures*
Evolution of high level languages
FORTRAN
BASIC
Lisp
COBOL
ALGOL
The "Algol Family":AlgolW, Pascal, and Modula2* ADA* BCPL, C, and C++* Simula, SmallTalk, and Eiffel*
click the below link to download fourth chapter
http://www.uow.edu.au/~nabg/ABC/C4.pdf
C++ development environment
Integrated Development Environment
C++ input and output
A simple example program in C++:Design* Implementation*
C++ development environment
Integrated Development Environment
C++ input and output
A simple example program in C++:Design* Implementation*
click the below link to download fifth chapter
http://www.uow.edu.au/~nabg/ABC/C5.pdf
Sequence
Overall structure and main() Function
Comments
Variable definitions
Statements
Examples: "Exchange rates"* pH*
Naming rules for variables
Constants
Initialization of Variables
Converting data values
click the below link to download sixth chapter
http://www.uow.edu.au/~nabg/ABC/C6.pdf
Iteration
While loops
Examples: Modelling the decay of CFC gases* Newton's method for finding a square root* Tabulating function values*
Blocks
"Boolean" variables and expressions True and False* Expressions using "AND"s and "OR"s*
Short forms: C/C++ abbreviations
Do ... while
For loop
Break and Continue statements
click the below link to download seventh chapter
http://www.uow.edu.au/~nabg/ABC/C7.pdf
- Break and Continue statements
- Making choices
- A realistic program: Desk Calculator
- IF...
- Terminating a program
- Example Programs: Calculating some simple statistics* Newton's method for roots of polynomials*
- What is the Largest? What is the Smallest?
- Dealing with more data
- Defining filestream objects
- Using input and output filestreams
- Stream states
- Options when opening filestreams
- When to stop reading data?
- More Formatting options
- Example
- Form of a function Definition
- Result types
- Function declarations
- Default argument values
- Type safe linkage, Overloading, and Name Mangling
- How functions work
- Inline functions
- A recursive function
- Examples of simple functions: GetIntegerInRange* Newton's square root algorithm as a function*
- The rand() function
- Examples: pi-Canon* (html text of section introducing coding example), (text file with all code for pi-cannon) Function plotter*
- Defining one dimensional arrays
- Initializing one dimensional arrays
- Simple Examples Using One-Dimensional arrays: Histogram* Plotting once more*
- Arrays as arguments to functions
- Strings: Arrays of characters
- Multi-dimensional arrays: Definition and initialization* Accessing individual elements* As arguments to functions*
- Arrays of Fixed length Strings
- Examples using arrays: Letter Counts* Simple encryption* Simple image processing*
Programs with functions and arrays
- Curses
- Heat diffusion
- Menu Selection
- Pick the keyword
- Hangman (html text of section introducing hangman problem), (text file with all hangman code)
- Life
Standard algorithms(Postscript text of chapter on standard searching and sorting functions)
- Finding the Right Element: Binary Search: An iterative binary search routine* Isn't it a recursive problem?* What was the cost?
- Establishing Order
- A simple sort of sort
- Quicksort: a better sort of sort: The algorithm* An implementation* An enhanced implementation* (html text of section on Quicksort)
- Algorithms, Functions, and Subroutine Libraries
- The "Code Coverage" Tool
- The Profiler
Design and documentation : 1
- Top down functional decomposition
- Documenting a design
Enum, Struct, and Union
- Enumerated types
- structs
- Unions(html text of section on C/C++ Unions)
Examples using structs
- Reordering the class list again
- Points and Rectangles
- File of Records
Bits and pieces(Postscript file for chapter explaining role of bit-level operations in C/C++)
- Bit manipulations
- Making a Hash of it: Example hashing function for a character string* A simple "hash table"* Example: identifying the commonly used words*
- Coding "Property Vectors"
- Pieces (Bit fields)
- Class declarations and definitions: Form of a class declaration* Defining the member functions* Using class instances* Initialization and "constructor" functions* const member functions* inline member functions*
- Example: Bitmaps (Sets)
- Numbers - a more complex form of data (details of a class for +, -, *, /, on 100 digit numbers; as a postscript file) code of multidigit arithmetic class
- A glance at the "iostream" classes
Dynamic data and pointers
- The "Heap"
- Pointers: Some "pointer" basics* Using pointers* Strings and hash tables revisited*
- Example: "Air Traffic Controller"
- The "address of" operator
- Pointers and Arrays
- Building Networks
Collections of data (postscript file of chapter presenting several standard "collection class" abstract types)
- Class Queue
- Class PriorityQueue
- Class DynamicArray (code in C29 and C30 examples)
- Class List
- Class BinaryTree (code in C23 iterators example)
- Collection class Libraries
A World of Interacting Objects
- RefCards: Design* Implementation*
- InfoStore: Initial design outline for InfoStore* Design and Implementation of the Vocabulary class* Other classes in the InfoStore program* Final class design for the InfoStore program (Postscript file, long case studies suggesting how to identify and then characterize objects and their classes
Intermediate class
- Shared Class Properties
- Friends
- Iterators: ListIterator* TreeIterator*(html file on Iterators for collection classes), (example code with tree iterator)
- Operator functions: Defining operator functions* Operator functions and the iostream library*
- Resource Manager Classes and Destructors: Resource management* Destructor functions* The assignment operator and copy constructors*
- Inheritance: Discovering similarities among prototype classes* Defining Class Hierarchies in C++* But how does it work?!* Multiple Inheritance* Using Inheritance (html file of section introducing inheritance and C++ class hierarchies)
Two more "trees"(Postscript file of chapter on AVL trees and Btree storage structures)
- AVL Trees: What's wrong with binary trees?* Keeping your balance* An implementation* Testing!*(code for an AVL tree class)
- BTree: Multiway trees* A tree on a disk?* BTree: search, insertion, and deletion operations* An implementation* Testing* (code in C30 example)
Templates (Postscript file of Templates chapter)
- A general function and its specializations
- Language Extensions for Templates:Template declaration* Template instantiation*
- Specialized Instantiations of Template Code
- A Template Version of QuickSort
- The Template Class "Bounded Array"
- The Template Class Queue
Exceptions (Postscript file of Exceptions chapter)
- C++'s Exception Mechanism
- Example: Exceptions for class Number
- Identifying the Exceptions that you intend to throw
Example: Supermarket
- Background and Program Specification/li>
- Design: Design preliminaries* Scenarios: identifying objects, their classes, their responsibilities, their data* Filling out the definitions of the classes for a partial implementation*
- A partial implementation
- Finalising the Design: Histograms* Simulating the checkouts and their queues* Organizing the checkouts*
Design and documentation: 2
- Object-Based Design
- Documenting a design
The Power of Inheritance and Polymorphism (postscript file, of chapter with example illustrating use of inheritance and polymorphism)
- The "Dungeon" Game
- Design: Preliminaries* WindowRep and Window classes* DungeonItem hierarchy*(html text of chapter with example illustraing inheritance)
- An implementation: Windows classes* Class Dungeon* DungeonItems*( html text of chapter with example illustraing inheritance), (the code for "dungeon game" example)
Reusable designs
- The RecordFile Framework: Concepts(html text)
- The Framework classes: Overview
- The Command Handler Classes: Class declarations* Interactions* Implementation Code*
- Collection Classes and their Adapters*
- Class Record
- The Windows Class Hierarchy: Class Responsibilities* Implementation Code* Using the concrete classes from a framework*
- Organizational Details (Student Rec application, example use of a framework)(code for a simplified framework class library and application)(PDF of chapter)
- "Resources" and "Macros"
- Architects, Experts, and Wizards
- Graphics
- Persistent Data
- The Event Handlers
- The Same Patterns in the code
http://www.uow.edu.au/~nabg/ABC/C8.pdf
http://www.uow.edu.au/~nabg/ABC/C9.pdf
http://www.uow.edu.au/~nabg/ABC/C10.pdf
http://www.uow.edu.au/~nabg/ABC/C11.pdf
http://www.uow.edu.au/~nabg/ABC/C12.pdf
http://www.uow.edu.au/~nabg/ABC/C13.pdf
http://www.uow.edu.au/~nabg/ABC/C14.pdf
http://www.uow.edu.au/~nabg/ABC/C15.pdf
http://www.uow.edu.au/~nabg/ABC/C16.pdf
http://www.uow.edu.au/~nabg/ABC/C17.pdf
http://www.uow.edu.au/~nabg/ABC/C18.pdf
http://www.uow.edu.au/~nabg/ABC/C19.pdf
http://www.uow.edu.au/~nabg/ABC/C20.pdf
http://www.uow.edu.au/~nabg/ABC/C21.pdf
http://www.uow.edu.au/~nabg/ABC/C22.pdf
http://www.uow.edu.au/~nabg/ABC/C23.pdf
http://www.uow.edu.au/~nabg/ABC/C24.pdf
http://www.uow.edu.au/~nabg/ABC/C25.pdf
http://www.uow.edu.au/~nabg/ABC/C26.pdf
http://www.uow.edu.au/~nabg/ABC/C27.pdf
http://www.uow.edu.au/~nabg/ABC/C28.pdf
http://www.uow.edu.au/~nabg/ABC/C29.pdf
http://www.uow.edu.au/~nabg/ABC/C30.pdf
http://www.uow.edu.au/~nabg/ABC/C31.pdf
0 comments for this post