-
>
>
>
> Examples and Notes
Date
Description
2017-09-01
distance.cpp
geometry.h
geometry.cpp
makefile
(may not display well; use "Save Link As...")
hello.cpp
(strings and string streams)
strings.cpp
(reference parameters)
2017-09-06
Euclidean distance calculator with structs and objects:
distance_with_structs.cpp
distance.cpp
geometry.h
geometry.cpp
makefile
2017-09-11
todo.cpp
task.h
task.cpp
todolist.h
todolist.cpp
makefile
2017-09-13
Operator Overloading
rational_test.cpp
rational.h
rational.cpp
makefile
2017-09-20
To-do list with dynamic memory allocation:
todo.cpp
task.h
task.cpp
todolist.h
todolist.cpp
makefile
constructors.cpp
2017-09-25
To-do list with dynamic memory allocation and placement new:
todo.cpp
task.h
task.cpp
todolist.h
todolist.cpp
makefile
To follow: to-do list with STL vector
2017-09-27
Class Template
point.h
point.cpp
civector.h
sort_points.cpp
sort_strings.cpp
makefile
2017-10-02
Iterators
civector.h
sort_strings.cpp
makefile
2017-10-09
Standard Containers
count_segments.cpp
2017-10-11
Midterm Exam Practice
Template function with implicit interface for games
game_main.cpp
merlin.h
merlin.cpp
spinout.h
spinout.cpp (intentionally omitted)
makefile
2017-10-23
Pig with Player class hierarchy:
pig_main.cpp
pig.h
pig.cpp
player.h
player.cpp
human.h
human.cpp
computer.h
computer.cpp
die.h
die.cpp
makefile
Refactored with Strategy class:
pig_main.cpp
pig.h
pig.cpp
player.h
player.cpp
strategy.h
strategy.cpp
interactive.h
interactive.cpp
threshold.h
threshold.cpp
die.h
die.cpp
makefile
2017-10-30
Factory Pattern:
pig_main.cpp
player_factory.h
computer_factory.h
dynamic_factory.h
pig.h
pig.cpp
player.h
player.cpp
human.h
human.cpp
computer.h
computer.cpp
dynamic.h
dynamic.cpp
die.h
die.cpp
makefile
2017-11-01
Multiple Inheritance:
Simulation
Simulation w/ Multiple Inheritance
and
class diagram
(the comments are in the Java version)
2017-11-08
Implementation of Inheritance and Polymorphism
abi_multiple.cpp
Scott, Programming Language Pragmatics, § 9.5
ABI Specification for vtables
2017-11-13
Graph Search using Strategy Pattern and Template Methods:
graph_test.cpp
graph.h
graph.cpp
makefile
2017-11-29
Java Interfaces and Inheritance
2017-12-04
Covariance
2017-12-06
Final Exam Practice
Go