Class Lectures and Reading Assignments for CS 124

This page documents what we do in class. It contains C++ programs (and occasional C or Java programs) that we will discuss in class, reading assignments from our textbook, simple homework exercises that you can work on for practice and exam preparation (not for credit), links to other sources of information, etc.

The reading assignments and practice problems are listed by the date on which they were assigned. The sample program files are listed by the date on which they were used. You can click on any .cpp, .h, .c, or .java link and see the source code. When you are viewing source code, you can use your browser's "File -> Save As..." menu item to save a copy of the file on your computer. It is a good idea for you to "play" with these example programs; compile them, run them, make simple changes to them and compile and run them again.

  • Wednesday, April 30.
    • The final exam is Monday, May 5, from 1:00-3:00pm.
    • The final exam will cover Chapters 1-8, Chapter 10, Sections 11.1 and 11.2, Sections 12.1 and 12.2, and Chapter 17.
  • Monday, April 28.
    • Read Section 17.2, pages 843-847.
    • Here is a zip file containing example programs for Chapter 17 of the textbook along with several examples of exceptions in Java.
  • Wednesday, April 23.
    • Your tenth homework assignment is available from the homework page
    • Read Section 17.1, pages 822-843.
  • Monday, April 21.
  • Wednesday, April 16.
    • Your ninth homework assignment is available from the homework page
    • Read Sections 11.1-11.2, pages 569-603.
    • Here is a zip file containing example programs for Chapter 11 of the textbook.
  • Monday, April 7.
    • NOTE: The second midterm exam is next Monday, April 14.
      The exam will cover Chapters 6, 7, 8 and 10.
    • Here is a zip file containing example programs for Chapter 10 of the textbook.
  • Wednesday, April 2.
    • Your eighth homework assignment is available from the homework page
    • NOTE: We shall postpone the second midterm exam by one week to Monday, April 14. This will give us time to finish Chapter 10 before the exam.
    • For Monday, read Sections 10.4-10.5, pages 536-553.
  • Wednesday, March 26.
    • Your seventh homework assignment is available from the homework page
  • Monday, March 24.
    • Read Sections 10.1-10.3, pages 493-535.
    • Here is a zip file containing the example programs from Chapter 9 of the textbook.
  • Wednesday, March 19.
    • Read Section 9.2, pages 471-486.
  • Monday, March 17.
    • Read Section 9.1, pages 457-471.
  • Wednesday, March 5.
    • Here is a zip file containing the example programs from Chapter 8 of the textbook.
  • Monday, March 3.
    • Your sixth homework assignment is available from the homework page
    • For Wednesday, read Section 8.2, pages 428-445.
    • Here is a short program that demonstrate a subtle aspect of defining friend functions. Taken from an article in "C/C++ Users Journal".
  • Wednesday, February 27.
    • Read Chapter 7, but we will not go over much of it in class since most of what is in this chapter is the same as for Java. The main difference is that C++ evaluates boolean expression a bit differently (see in particular pages 339-340). Be sure to read the page about "enumeration types", page 342, and also the pages about blocks and scope, pages 357-363.
    • Read Section 8.1, pages 405-427.
    • A simple example using the bool data type.
    • A simple example of an enum data type.
    • An example, translated into three different languages, that shows how each language handles the concept of block scope in a different way.
  • Wednesday, February 20.
    • Remember that the first midterm exam is on Monday. It will cover the first 6 chapters of the book, up to Section 6.2.
    • Here is another example of using "information hiding".
    • Here is the same example of "information hiding" written in Java. This Java version is a bit cleaner than the C++ version.
  • Monday, February 18.
  • Wednesday, February 13.
  • Monday, February 11.
  • Wednesday, February 6.
  • Monday, February 4.
  • Wednesday, January 30.
  • Monday, January 28.
  • Wednesday, January 23.
    • Your second homework assignment is available from the homework page.
    • Read Chapter 4, Sections 4.1 and 4.2, pages 157-176.
    • Here is a simple program that demonstrates call-by-value parameter passing and another program that demonstrates the idea of procedure abstraction.
    • In Chapter 3, notice pages 104-106 about casting. The notation for casting in C++ is different from the notation used in Java.
  • Wednesday, January 16.
  • Monday, January 14.


Return to the CS 124 home page.


compliments and criticisms