CSCI 2610/2611
Fall 2000

Last modified 11/17/00

Announcements

The final exam will be Tuesday, December 12 from 11:00 to 1:00.

The practice quizzes are below.

Syllabus

This is a computer programming course using C++. See the syllabus for details.

Office hours

MWF 1:00-2:00
TTh 9:00-10:00
MW 8:00pm-8:30

Laboratory Assignments

Assignments will appear here as they are assigned.

  • Laboratory assignment 1
  • Laboratory assignment 2
  • Laboratory assignment 3
  • Laboratory assignment 4
  • Laboratory assignment 5
  • Laboratory assignment 6
  • Laboratory assignment 7
  • Laboratory assignment 8
  • Laboratory assignment 9
  • Laboratory assignment 10
  • Laboratory assignment 11
  • Laboratory assignment 12
  • Self-test exercises and practice quizzes

    You should make a habit of working most of the self-test exercises in the book, and checking your answer against the answer in the book. That will help you remember the material. Additional exercises, with solutions, are as follows.
  • Exercise set 1
  • Solutions to exercise set 1
  • Practice questions for quiz 1
  • Solutions to practice questions for quiz 1
  • Practice questions for quiz 2
  • Solutions to practice questions for quiz 2
  • Practice questions for quiz 3
  • Solutions to practice questions for quiz 3
  • Practice questions for quiz 4
  • Solutions to practice questions for quiz 4
  • Computers

    For the lab, we will use the computers in Austin 320. They are dual boot computers, running either Windows NT 4.0 or Solaris 2.8. We will use Solaris for the assignments. Solaris is a brand of Unix.

    Each of you will receive an account. You account is usually your first initial followed by your last name, up to a total of eight characters. So if you name is Milton Stanikowski, your id is mstaniko. In some cases it is necessary to choose other names to avoid conflicts. Your password is probably the last 6 digits of your social security number.

    The first day of laboratory, you should try your account. A brief tutorial on Solaris will also be given.

    Notes on using Solaris are available.

    Note. The most pleasant text editor to use for software development under Unix is Emacs. The notes on Solaris discuss how to use Emacs.

    Notes on writing programs, and how programs are graded

    Please read the following about writing and turning in programs, and how programs are graded.
  • Notes on grading programs
  • Advice on writing programs
  • Checklist for turning in programs
  • Small scale software development notes

    Please read, over time, the notes on small-scale software development.

    Sample C++ programs

    Here are a few sample C++ programs.
  • A simple main program
  • A program using a function
  • A program using an if statement
  • A program using a loop
  • Lecture summaries

    1. [8/17] I handed out the syllabus and went over it. We began looking at C++. We covered basic types, variables and assignment statements. You should read Chapters 1.1-1.3 and 2.1-2.4.

    2. [8/22] We continued on the basics of C++, including expressions, input and output, if=statements and while-loops. Notes are available.

    3. [8/24] We looked at loop design strategies and examples of loops. The two main loop design strategies studied are action-oriented loop design (where you concentrate on the actions to be repeated) and data-oriented loop design (where you concentrate on the data that is being computed in the loop). Data-oriented loops are based on loop invariants. Notes are available.

    4. [8/29] We began looking at functions. A function is a component of a program, a tool that can be used by other functions. We began to look at parameter passing, function calling and function contracts. Notes are available.

    5. [8/31] We looked more at functions, and did a few examples.

    6. [9/5] We discussed recursion, and did some examples of recursion. Recursion is discussed in Chapter 12 of the text. You should read that chapter. Notes on recursion are also available.

    7. [9/7] We discussed recursion some more, and discussed parameter passing modes (call-by-value and call-by-reference).

    8. [9/12] We began looking at input and output streams. This material is in Chapter 5 of the text.

    9. [9/14] We continued looking at input and output streams.

    10. [9/19] We began looking at objects and object-oriented programming. This material is in Chapter 6 of the text.

    11. [9/21] We did an example using open objects. We implemented a type Rational, and operations on rational numbers.

    12. [9/26] We looked at classes and how to create and use closed objects. We looked at a class for maintaining dates.

    13. [9/28] We covered more on classes, and discussed how to break a program into modules. We also began looking at arrays. Arrays are covered in chapter 9. We have not covered material in chapters 7 and 8. We will come back to chapter 7 later.

    14. [10/3] Quiz 2. After the quiz we continued on arrays. We also discussed for-loops, from chapter 7. You should continue reading chapter 9.

    15. [10/5] We did more work on arrays, doing examples of functions that work on arrays. We looked at functions on null-terminated strings.

    16. [10/10] We begin to explore searching and sorting.

    17. [10/12] We had the second chance on quiz 2, and then continued exploring searching and sorting. We covered binary search.

    18. [10/17] We began looking at sorting, and did an implementation of the exchange sort algorithm.

    19. [10/19] We did insertion sort and began quicksort.

    20. [10/26] We finished quicksort, including a rough analysis of how much time it takes to run.

    21. [10/31] Happy Halloween. We looked at combining structures with arrays, and handle a few loose ends. We began looking at pointers.

    22. [11/2] Quiz 3. We continued looking at pointers.

    23. [11/7] We looked at the relationship between pointers and arrays.

    24. [11/9] We looked at pointers to structures and linked lists.

    25. [11/14] We explored linked lists, both from a concrete point of view and an abstract point of view.

    26. [11/16] We will continue to work with linked lists.

    27. [11/21] Quiz.