Welcome to Professor Ziegler's CISC 3110 Sample Program Home Page
The following are links to files containing source code foir the sample programs used during the in-class lectures.
You may download a copy of these notes only if you are a registered student in my CISC 3110 class.
To download a file, RIGHT CLICK on the link and use the "Save Link Target As" feature of your browser.
Introduction:
Introductory Program - Bank Accounts
Sample input data file for Bank Accounts program
Chapter 7: Introduction to Classes and Objects
Using struct
Using class
All class
Member Functions
Member Functions - All class
Separate Compilation
    
Contestant.cpp
    
Contestant.h
Mutators and Accessors
    
Contestant.cpp
    
Contestant.h
Contestant Database - All class
  
Contestant.cpp
  
Contestant.h
   
Name.cpp
   
Name.h
   
Job_info.cpp
   
Job_info.h
   
Personal_info.cpp
   
Personal_info.h
Contestant Database 2 - All class
  
Contestant.cpp
  
Contestant.h
   
Name.cpp
   
Name.h
   
Job_info.cpp
   
Job_info.h
   
Personal_info.cpp
   
Personal_info.h
Constructor Demo
Overloading Constructors
    
Contestant.cpp
    
Contestant.h
   
Name.cpp
   
Name.h
   
Job_info.cpp
   
Job_info.h
   
Personal_info.cpp
   
Personal_info.h
Overloading Constructors 2
    
Contestant.cpp
    
Contestant.h
   
Name.cpp
   
Name.h
   
Job_info.cpp
   
Job_info.h
   
Personal_info.cpp
   
Personal_info.h
Overloading Constructors 3
    
Contestant.cpp
    
Contestant.h
   
Name.cpp
   
Name.h
   
Job_info.cpp
   
Job_info.h
   
Personal_info.cpp
   
Personal_info.h
Game Show
 
Quizshow.cpp
 
Quizshow.h
 
Contestant.cpp
 
Contestant.h
 
Name.cpp
 
Name.h
 
Job_info.cpp
 
Job_info.h
 
Personal_info.cpp
 
Personal_info.h
Game Show 2
 
Quizshow.cpp
 
Quizshow.h
 
Contestant.cpp
 
Contestant.h
 
Name.cpp
 
Name.h
 
Job_info.cpp
 
Job_info.h
 
Personal_info.cpp
 
Personal_info.h
Destructor Demo
Input Validation
    
CharRange.cpp
    
CharRange.h
PositionCursor.cpp
ScreenInputForm.cpp
YoYo.cpp
Sample input data file for Chapter 7 programs
Chapter 8: 2D Arrays; Arrays of Structures, Arrays of Classes
Two Dimensional Arrays
Array Of Structures
Array Of Structures with Constructors
Array Of Class Objects
    
Circle.h
Array Of Class Objects with Constructors
    
Circle.h
Sample input data file for Chapter 8 programs
Chapter 10: Pointers
Pointer to Address
Pointer Variable
pass by value
pass by pointer
pass by reference
Array Ptr 1
Array Ptr 2
Array Ptr 3
Ptr Param
Ptr Array Param
Ptr Arithmetic
Ptr Compare
Ptr To Constant
Dynamic Memory Allocation
Return Ptr
Ptr To Structure
Ptr To Class
Donations
    
DonList.cpp
    
DonList.h
Game Show
 
Quizshow.cpp
 
Quizshow.h
 
Contestant.cpp
 
Contestant.h
 
Name.cpp
 
Name.h
 
Job_info.cpp
 
Job_info.h
 
Personal_info.cpp
 
Personal_info.h
Time Function
Chapter 11: Advanced Class Definitions and OOP
this Example - main
    
ThisExample.cpp
    
ThisExample.h
Static Member Variables
    
budget.h
Static Member Functions
    
budget2.cpp
    
budget2.h
Friend Function
    
budget3.cpp
    
budget3.h
    
auxil.cpp
    
auxil.h
Default Copy Constructor
Deficient Copy Constructor
    
NumberArray.cpp
    
NumberArray.h
Programmer Copy Constructor
    
NumberArray2.cpp
    
NumberArray2.h
Overloaded Assignment Operator
    
overload.cpp
    
overload.h
Overloaded Math and Relational Operators (member functions)
    
feetinch4.cpp
    
feetinch4.h
Overloaded Math and Relational Operators 2 (friend functions)
    
feetinch4.cpp
    
feetinch4.h
Overloaded Insertion and Extraction Operators
    
feetinch5.cpp
    
feetinch5.h
Overloaded Bracket Operator
    
intarray.cpp
    
intarray.h
Conversion Operators
    
feetinch6.cpp
    
feetinch6.h
Convert Constructors
    
Convert.cpp
    
Convert.h
Object Composition
Inheritance
    
inheritance.h
Protected Member Inheritance
    
inheritance1.cpp
    
inheritance1.h
Order Of Execution
Passing Arguments To Base Class Constructors
    
inheritance2.cpp
    
inheritance2.h
Overriding Base Class Functions
    
inheritance3.cpp
    
inheritance3.h
HTMLTable
    
table.html
Chapter 12: C-Strings and the C++ string Class
String Literals
Array Of Char
Dynamic Allocation
strstr
MyString Class
    
mystring.cpp
    
mystring.h
Chapter 13: Advanced File and I/O Operations
File Write Read
File Append
Output Formatting
sstream Formatting
Error Flags
getline
    
input file: murphy.txt
Rewind File
Multiple Files
    
input file: hownow.txt
Binary File
    
input file: nums.dat
Structure Record Write ReadA
tellg
    
input file: letters.txt
File Read And Write
    
input file: invtry.dat
Chapter 14: Recursion
Countdown
Countdown2
Factorial
gcd
Fibonacci Numbers
Binary Search
Quick Sort
Quick Sort Trace
Towers Of Hanoi
Enumerated Algorithm
Chapter 16: Exceptions; Templates; the STL
Throwing An Exception
Throwing An Exception Class
    
IntRange.h
Multiple Exceptions
    
IntRange2.h
Pass Info To Exception Handler
    
IntRange3.h
Re-throwing An Exception
Function Templates
swap Function Template
Operators In Function Templates
Templates With Multiple Types
Overloading Function Templates
Class Templates
    
SimpleVector.h
Class Template Inheritance
    
SimpleVector.h
    
searchvect.h
Containers And Iterators
STL algorithms
STL for_each
Comments or suggestions should be sent to:
ziegler@sci.brooklyn.cuny.edu
Chaim Ziegler, Ph.D.
Brooklyn College
Department of Computer and Information Science
2900 Bedford Avenue
Brooklyn, NY 11210
(718) 951-5000 x2074