The text book for this course is Objects, Abstraction, Data Structures, and Design using C++ by Elliot B. Koffman and Paul A.T. Wolfgang, John Wiley and Sons, 2006.
We cover Chapters P to 11 and spend one week on solving recurrences.
Slides of the lectures and C++ code will be posted below.
L-1 Mon 23 Aug 2010: welcome to mcs 360
(printer friendly version)
C++ code hello_world.cpp ,
hello_there.cpp , and
gcd_dowhile1.cpp .
L-2 Wed 25 Aug 2010:
Elements of C in C++
(printer friendly version)
C++ code grading_scale.cpp ,
show_doubles.cpp ,
die_freq.cpp ,
die_freq_fun.cpp , and
work_pointers.cpp .
L-3 Fri 27 Aug 2010:
Arrays, Strings, and Files
(printer friendly version)
C++ code all_arrays.cpp ,
strings_are_arrays.cpp ,
use_getline.cpp , and
copy_files.cpp .
L-4 Mon 30 Aug 2010:
software design and abstract data types
(printer friendly version)
C++ code current_time.cpp ,
a_class_clock.h ,
a_class_clock.cpp , and
time_with_clock.cpp .
L-5 Wed 1 Sep 2010:
unified modeling language and a case study
(printer friendly version)
C++ code
command_line_args.cpp ,
phonebook.h ,
phonebook.cpp ,
use_phonebook.cpp , and
use_phonebook2.cpp .
L-6 Fri 3 Sep 2010:
Bugs, Exceptions, and Testing
(printer friendly version)
C++ code test4zero.cpp ,
read_integer1.cpp ,
read_integer2.cpp ,
read_file1.cpp ,
out_of_range.cpp ,
except_hierarchy.cpp , and
in_char_range.cpp .
L-7 Wed 8 Sep 2010:
assertions and efficiency
(printer friendly version)
C++ code open_file.cpp ,
guess_character.cpp , and
find_duplicates.cpp .
L-8 Fri 10 Sep 2010:
inheritance and polymorphism
(printer friendly version)
C++ code clock.h ,
clock.cpp ,
test_clock.cpp ,
alarm_clock.h ,
alarm_clock.cpp ,
test_alarm_clock.cpp ,
and
food.h .
L-9 Mon 13 Sep 2010:
namespaces and class hierarchies
(printer friendly version)
C++ code
point1.h ,
point1.cpp ,
test_point1.cpp ,
point2.h ,
point2.cpp ,
test_point2.cpp ,
point3.h ,
point3.cpp ,
test_points.cpp ,
shape.h ,
rectangle.h ,
rectangle.cpp ,
circle.h ,
circle.cpp ,
test_shape.cpp ,
processor.h ,
processor.cpp ,
computer.h ,
computer.cpp ,
and
test_computer.cpp .
L-10 Wed 15 Sep 2010:
templates and vectors
(printer friendly version)
C++ code
templated_swap.cpp ,
vector_of_names.cpp ,
and
test_our_own_vector.cpp .
L-11 Fri 17 Sep 2010:
single linked lists
(printer friendly version)
C++ code
mcs360_list.h ,
mcs360_list.tc ,
test_mcs360_list.cpp ,
and
use_stl_list.cpp .
L-12 Mon 20 Sep 2010:
double linked lists and iterators
(printer friendly version)
C++ code
mcs360_double_node.h ,
mcs360_double_list_first.h (first basic version),
mcs360_double_list.tc ,
mcs360_double_list.h ,
mcs360_list_iterator.h ,
test_mcs360_double_list.cpp ,
and
show_function_object.cpp ,
L-13 Wed 22 Sep 2010:
the stack ADT as STL vector and list
(printer friendly version)
C++ code
use_stl_stack.cpp ,
match_brackets.cpp ,
use_stl_vector_as_stack.cpp , and
use_stl_list_as_stack.cpp .
L-14 Fri 24 Sep 2010:
stack implementations
(printer friendly version)
L-15 Mon 27 Sep 2010:
stack applications
(printer friendly version)
C++ code
parsing_postfix_string.cpp ,
test_postfix_evaluator.cpp ,
converting_infix_sum.cpp ,
infix_to_postfix.cpp , and
test_infix_to_postfix.cpp .
L-16 Wed 29 Sep 2010: the queue
(printer friendly version)
C++ code
use_stl_queue.cpp ,
printer_queue.cpp ,
use_stl_list_as_queue.cpp , and
use_stl_vector_as_queue.cpp .
L-17 Fri 1 Oct 2010: queue
implementations
(printer friendly version)
C++ code
mcs360_circular_fixed_buffer.h,
mcs360_circular_fixed_buffer.tc,
use_buffer.cpp,
mcs360_double_node.h,
mcs360_circular_double_ring.h,
mcs360_circular_double_ring.tc,
and use_ring.cpp.
L-18 Mon 4 Oct 2010: simulations
(printer friendly version)
L-19 Wed 6 Oct 2010: review of the first
18 lectures
L-20 Fri 8 Oct 2010: questions
for the first midterm exam, with answers .
L-21 Mon 11 Oct 2010: recursive
definitions
(printer friendly version)
C++ code
recursive_factorial.cpp,
recursive_on_stl_list.cpp, and
recursive_gcd.cpp.
L-22 Wed 13 Oct 2010: binary search
(printer friendly version)
C++ code
towers_of_hanoi.cpp,
binary_search_in_vector.cpp,
fibonacci.cpp, and
fast_power.cpp.
L-23 Fri 15 Oct 2010:
enumeration and backtracking
(printer friendly version)
C++ code
enumerate_bits.cpp,
enumerate_words.cpp,
percolation.cpp,
gcd_stack.cpp, and
fib_stack.cpp.
L-24 Mon 18 Oct 2010:
binary search trees
(printer friendly version)
L-25 Wed 20 Oct 2010:
expression trees
(printer friendly version)
L-26 Fri 22 Oct 2010:
priority queues and Huffman trees
(printer friendly version)
L-27 Mon 25 Oct 2010: pairs, sets,
and maps
(printer friendly version)
L-28 Wed 27 Oct 2010: hashing
(printer friendly version)
L-29 Fri 29 Oct 2010: applications
of maps
(printer friendly version)
L-30 Mon 1 Nov 2010: quadratic sorts
(printer friendly version)
C++ code
use_stl_sort.cpp,
selection_sort.cpp,
bubble_sort.cpp, and
insertion_sort.cpp.
L-31 Wed 3 Nov 2010: better sorting
algorithms
(printer friendly version)
C++ code
shell_sort.cpp,
merge_sort.cpp, and
heap_sort.cpp.
L-32 Fri 5 Nov 2010: quicksort
(printer friendly version)
C++ code
quicksort.cpp,
partition.cpp,
partition_with_iterator.cpp,
quicksortv2.cpp,
time_stl_sort.cpp, and
quicksortv3.cpp.
L-33 Mon 8 Nov 2010: balancing
search trees
(printer friendly version)
L-34 Wed 10 Nov 2010: red-black
trees
(printer friendly version)
L-35 Fri 12 Nov 2010: B-Trees
(printer friendly version)
C++ code
mcs360_btree_node.h ,
mcs360_btree_node_test.cpp ,
mcs360_btree.h ,
mcs360_btree.tc , and
mcs360_btree_test.cpp .
L-36 Mon 15 Nov 2010: review of the
lectures 21 to 35
L-37 Wed 17 Nov 2010: questions
for the second midterm exam, with answers .
L-38 Fri 19 Nov 2010:
the substitution method
(printer friendly version)
and see also:
notes by Dimitris Diochnos on asymptotic notation and the substitution
method
L-39 Mon 22 Nov 2010:
the recursion-tree method
(printer friendly version)
L-40 Wed 24 Nov 2010:
the master method
(printer friendly version)
L-41 Mon 29 Nov 2010: review of
lectures 1 to 18
L-42 Wed 1 Dec 2010: review of
lectures 21 to 26, 30 to 32
C++ code for some solutions:
chebpoly.cpp,
numbers3.cpp,
plates.cpp, and
write_balance.cpp.
L-43 Fri 3 Dec 2010: review of
lectures 27 to 29, 33 to 35, 38 to 40