Each section of the course meets once a week. Where dates appear in parentheses, the first date is for the Tuesday section (ttc3a) and the second is for the Friday section (ffc3a).
Assignment Due Next Class: Read Chapter 1 and do the Self-Review Exercises at the end of the chapter. Check your own work. Write the answers to Exercises 1.13, 1.22, 1.24, 1.25, and 1.26 on paper and hand them in.
There is a document with some After-the-fact Notes on Homework 1 that you should look at.
Assignment due Next Class: Read Chapter 2 and do the Self-Review Exercises at the end of the chapter. Check your own work. Write the answers to Exercises 2.14, 2.34, 2.36, 2.39, and 2.40 on paper and hand them in.
Assignment Due Next Class: Read Chapter 3, and start
working on the Self-Review Exercises at the end of the chapter. Check
your own work. Do Exercise 3.45 and submit it as described in the Project Management
web page. Your solution must use two files, one called
gcd.cc
that implements the recursive algotithm described in
the exercise, and another named main.cc
, which is given in
class.
Note: Consult the Using Unix web pages for more information about using your Unix account.
Assignment Due Next Class: Finish doing the Self-Review Exercises at the end of chapter 3. We will discuss some of the topics from the end of the chapter in next week's class (templates, default arguments, scope resolution operator).
The programming assignment for next class is described in the Homework 4 document.
enum
s. Introduction to pointers.
Development of Homework 5a.Assignment Due Next Class: Read Chapters 4 and 5 and do the Self-Review exercises at the end of both chapters if you have not done them all already.
Do the programming assignment that is described in the Homework_5a web page. Students in both sections may submit this assignment by midnight October 15 without losing late points.
Assignment Due Next Class: There will be a one hour exam covering material from chapters 1-5 of the text, as well as material covered in the Using Unix web pages.
Note: The exam will be given during the last hour of the class. Start working on the assignment that is described in the Homework_5b web page. The due date will be the class after the exam (10/29; 10/25).
Assignment Due Next Class: Read Chapter 6, and complete the Self-Review Exercises at the end of the chapter.
Assignment Due Next Class: Finish Chapter 6. Plan how to implemnt the Property List class.
plist.cc
. Inline functions and
how performance issues impact encapsulation.
Assignment Due Next Class: Read Chapter 7. Rework Homework 5b so
that it implements and uses the Plist class defined in
~vickery/CS-200/Homework_6/plist.h
. Be sure your
application program links with
~vickery/CS-200/Homework_6/plist.o
and runs correctly
before implementing your own plist.o
. Note: You are
free to edit the private part of the Plist class definition in
plist.h
for this exercise, but no other public part.
Note: There will be an exam during the last 45 minutes of the first class after Thanksgiving recess.
Assignment Due Next Class: Read Chapter 8. Use gdb to
step through Exercise 7.9 from the textbook. There is a web page on
gdb at:
http://babbage.cs.qc.edu/courses/cs701/Handouts/using_gdb.html
.
Assignment Due Next Class: (Homework #7) Add the commands
clone and showclone to the driver program for your Plist
class exercise. Your main() function should declare two objects
of class Plist
. In class we called them
theList
and cloneList
. When the user enters
the clone command, the main program does an assignment of
theList
to cloneList
, and when the user enters
the showclone command the program displays the current state of
the cloneList
Plist. Sample code:
int main() { Plist theList, cloneList; ... case DO_CLONE: cloneList = theList; break; case DO_SHOW_CLONE: cloneList.showList(); break; ...Submit two versions of
plist.cc
. One version, to be named
plist_s.cc
is to implement operator=() to do a
shallow copy of the list, and the other version, to be named
plist_d.cc
is to implement operator=() to do a deep
copy of the list. Be sure to test both versions of the program to make
sure they behave as expected.The following items are not required, but would be good practice for you:
cloneList
whenever
you create a new cloneList
.<<
operator.README
file in your project directory so I will know about
it.There will be an exam during the last 45 minutes of the next class. It will cover material from chapters 6-8 plus concepts covered in class that may not come directly from the book, such as the relationships between memory segments and the various elements of a C++ program. Doing Homework #7 will help prepare you for the exam. Students who received 90 or above on the previous exam do not have to take this one; if they do take it but score less than 90, it will not count against them.
operator<<()
and operator>>()
.Exam Number 3.
Extra Credit Assignment. This assignment may be used to make up the equivalent of one "small" homework this term. (All homeworks were small except Homework 5b.) It must be submitted by midnight of December 23 to be elegible for credit. The assignment is to implement a new class derived from Plist that has the additional property of being sorted in either ascending or decending order. The constructor for this new class is to take an argument "up" or "down" that tells which way the list is to be sorted. Modify your main program so that there is one "up" list, one "down" list, and one "clone" list that might be a copy of either the up list or a down list. (The clone list should be of class Plist.) The user commands "up" and "down" tell the program which list new elements are to be added to.
Where to go from here. The following books are recommended for continuing your study of C++:
Exam questions may be drawn from the entire course, but the main emphasis will be on the material in Chapters 6-9 of the textbook.