CIS-3012 (C++ Programming) Home Page
This is the home page for Peter Chapin's C++ Programming course notes for the Spring 2017
semester. Here you will find electronic versions of class slides, homework assignments,
program samples, and links to other references of interest. If you are a student taking
C++ Programming you should bookmark this page.
- The course syllabus gives an overview of the course
and its content, lists course resources, and describes the grading policy and related
issues.
- For part of the course I will be using the Y text editor as a source of examples. The
source code for Y is on GitHub. See my short document about Git
for more information about how to use the system.
- The homework submission area and gradebook are on Moodle, but all other course
resources are here.
- A have an incomplete tutorial on C++ that
contains some material and sample programs of interest. My tutorial covers C++ 1998.
- I've prepared some general information on submitting
assignments.
- My home page contains other resources of potential
interest.
Adobe Connect
All live lectures will be
accessed from the same URL. The list below contains links to the recorded lectures.
The list below are approximate lecture-by-lecture topics for this course. The topics with
links to Adobe Connect lectures are for this (Spring 2016) edition of the course. The topics
without links are approximate and subject to change.
- 2017-01-16. Introduction to the course and to the development system on Lemuria.
Introduced std::string.
- 2017-01-18. Introduced std::vector. Demonstrated reverselines.cpp and reversefile.cpp as examples of string and
vector in action. Started discussion C++ references.
- 2017-01-23. Continued discussing references. Discussed const and range based
for loops.
- 2017-01-25. Introduced C++ classes by way of a rational number example. See Rational1.hpp and Rational1.cpp. The demonstration program is Rational1_demo.cpp.
- 2017-01-30. Continued discussing the Rational number example: inline methods, const
methods, implementing binary operator functions from the accumulating operator methods (+
from +=, etc).
- 2017-02-01. More on the Rational number example: Review of concepts presented so far
plus overloading of the << and >> operators for doing
I/O.
- 2017-02-06. Introduced the BigInteger1 example (BigInteger1.hpp, BigInteger1.cpp, BigInteger1_demo.cpp) along with several minor
features: static members (that are constants), type conversion operator methods, and an
introduction to friendship. Also introduced the idea of default constructors, copy
constructors, and uniform initialization syntax.
- 2017-02-08. Discussed a second example of a C++ class (Date.hpp, Date.cpp, Date_demo.cpp) that illustrates many of the points
already discussed in a different context.
- 2017-02-13. Discussed version two of the BigInteger class (BigInteger2.hpp, BigInteger2.cpp, BigInteger2_demo.cpp). This version uses
dynamically allocated memory to hold the digits. The design requires non-trivial copy
construction, copy assignment, and destructor methods.
- 2017-02-15. Reviewed and extended the discussion on BigInteger2. Also
reviewed Homework #3.
- 2017-02-27. Discussed move construction and move assignment. Introduced the Y project.
- 2017-03-01. Discussed the EditBuffer class in Y as another example of a
string-like class that manages a region of memory. Introduced inheritance in C++.
- 2017-03-06. More discussion on inhertiance using an example of an Animal class
hierarchy (Animal.hpp, Animal.cpp, Animal_demo.cpp). Introduced exceptions.
- 2017-03-08. More on C++ exceptions.
- 2017-03-13. Discussed how inheritance might be implemented and described multiple
inheritance.
- 2017-03-15. Discussed the use of multiple inheritance in the Y editor.
- 2017-03-20. Discussed exception safety and introduced std::unique_ptr. Also
briefly discussed the standard exception hierarchy.
- 2017-03-22. Introduced templates using a simple min template to illustrate
the basic ideas (min.hpp, min_demo.cpp).
- 2017-03-27. More on templates using the ArrayStatic template class as an example (ArrayStatic.hpp, Array_demo.cpp).
- 2017-03-29. More on templates using the ArrayDynamic template class as an example (ArrayDynamic.hpp, Array_demo.cpp). Introduced iterators using a bubble
sort example (sorters_1.hpp, sorters_2.hpp, sorters_demo.cpp).
- 2017-04-10. More on templates with a focus on iterators.
- 2017-04-12. Introduced the BoundedList template in
support of Homework #5.
- 2017-04-17. Reviewed BoundedList and described the requirements of Homework #5 in more
detail.
- 2017-04-19. More on Homework #5 with specifics about some of the syntactic and
semantic issues that arise in the assignment.
- 2017-04-24. Introduced explicit template specialization and template metaprogramming
(see notes below). Introduced standard threads.
- 2017-04-26. More discussion of standard threads. Discussed a simple thread demonstration program.
- 2017-05-01. Demonstrated C++ function objects and C++11 lambdas.
- 2017-05-03. Discussed the final exam.
- — Topics below are subject to change —
Homework
- Homework #01. Basic Concepts. Due:
2017-01-25.
- Homework #02. Quaternions. Due:
2017-02-08.
- Homework #03. Strings. Due: 2017-03-08.
- Homework #04. PipeWord. Due: 2017-03-31.
- Homework #05. SingleList. Due: 2017-04-28. Here
are some notes on the assignment to help clarify
what needs to be done.
- — Homeworks below are subject to change —
Notes
- Notes on strings. These notes introduce the
std::string class in the C++ library and explore the differences between strings
in C++ and C.
- Notes on vectors. These notes introduce the
std::vector template in the C++ library and explore the differences between
vectors in C++ and arrays in C. It also explores various ways of initializing
objects.
- Notes on references. References are
fundamental to programming in C++.
- Notes on const. Some comments on type
safety with respect to const. I also have some notes on const parameters to functions (a
relatively exotic topic).
- The range_based_loops.cpp
file contains material on range based for loops.
- — Notes below are subject to change —
- Notes on copying objects. These notes explore
some issues related to copy construction and copy assignment.
- Notes on object oriented programming (notes-oop.hpp, notes-oop.cpp). These notes demonstrate some of
C++'s basic facilities for doing OOP.
- Notes on multiple inheritance. These notes discuss
some issues surrounding C++'s multiple inheritance feature.
- Notes on exception handling. These notes
demonstrate the basics of C++ exception handling along with its interplay with inheritance
and multiple inheritance.
- Notes on friends. These notes discuss friendship
and some of its issues.
- Notes on Homework #5. These notes try to
explain how SingleList iterators work.
- Notes on explicit template
specialization. These notes show a sketch of a vector class with an explicit
specialization for type char.
- Notes on template
metaprogramming. These notes show a simple example of a template that calculates the
factorial function at compile time.
Links
Last Revised: 2017-05-04
© Copyright 2017 by Peter C.Chapin <PChapin@vtc.vsc.edu>