Introduction

Welcome to COP 4531, Data Structures, Algorithms, and Generic Programming, II. This is a continuation of the course COP 4530, with emphasis evolving to more sophisticated structures, more complex analyses, and higher levels of abstraction.

Because this course picks up where the previous leaves off, it is appropriate to quote from the syllabus of COP 4530:

This IS NOT a course in object-oriented programming.

This IS a course about efficiency of programs and programming, in various meanings of efficient. It is efficient to re-use code instead of re-writing code (or, worse, re-inventing code). It is efficient to select only the linguistic features you need without having to use costly extra features you do not need. It is efficient to minimize the run time of code, especially code that is destined for re-use. It is also efficient to minimize the memory and storage needs of code, recognizing that there may be a tradeoff between speed and memory requirements. It is efficient to spend less time writing a program of equal quality, and even more efficient to spend the same time writing a program of higher quality. In many applications, correctness is the ultimate form of efficiency, while in others efficiency means getting the best result possible in the limited time (or space) available.

Efficiency can happen at different levels. Take code: source code can be small in size, easy to read, and easy to understand. Executable code can be fast or compact (or both). The code production process can be efficient by applying good software engineering methodology. Code can run efficiently, in either a temporal or spatial sense. Savings in human effort also represent efficiency. Effort can be saved by good design, by careful (error-free) programming, and by re-using both code itself and patterns of problem solving that are known to be successful.

All these ideas of efficiency are central to this course. It is also true that all of these ideas of efficiency are fundamental to the design and specification of the C++ language, which is one of many reasons C++ is a great choice for the core language in our curriculum and for this course.

In general, it is an expectation in this course that students have matured significantly since beginning COP 4530. This expectation will be reflected in exams, assignments, and the ways exams and assignments are assessed. In particular, all programming assignments should adhere to high standards of software engineering, with appropriate use of C++ constructs, separate compilation of code files, and portable makefiles.

Instructors

This course is designed to serve both on-campus and distance students using web-based and other Internet-accessible components for all students. It is also designed to be taught by a team where the student body is sufficiently numerous or diverse. The team member roles are as follows:

Chris Lacher (that's me) is the lead instructor with overall responsibility for all students. He will also create the assignments, supervise the assessment of the programming projects, maintain the course code library, keep the on-line lecture materials up to date, give the on-campus lectures, and meet the on-campus recitation sessions. He will also create the exams and lead the assessment of exams.

Matt Porter (Associate Instructor) is a Computer Science Masters Graduate. He will participate in assessment of assignments and provide on-line help, advice, and expertise.

All of the instructional personnel will participate in the on-line interactions using the Blackboard Discussion Board.

Course Goals and Objectives

At the end of this course, the student should have experienced, and should permanently retain a working knowledge of, the following topics and concepts with items new to COP 4531 shown in color:

Data Structures

Algorithms

Generic Programming

Many of the algorithms studied will be implemented as generic algorithms.

Prerequisites

This course assumes that you have a working knowledge of C+ and substantial programming experience using C++. To give you a feel of where you should be, here are some things that should be familiar concepts and that are central building blocks to this course:

In addition to programming and C++, the following topics are important background:

We will discuss some of these prerequisites briefly where they first become relevant to this course, but only enough to refresh your memory. If you need a more detailed discussion, you should begin now to review the appropriate parts of your course prerequisit texts and other references so that when these topics come up again you will be up to speed. Review notes for the two previous courses in this sequence are available: COP 3330 and COP 4530.

Course Work Environment

There is a common environment for remote access that the department supports for this course (and a number of other courses in the curriculum). That environment consists of the following components:

For a complete description of the system see: http://system.cs.fsu.edu/

For distance students and any others who plan to work remotely, be aware that unencrypted telnet access to departmental servers is not supported: only secure (encrypted) connections using SSH are supported. SSH, SecureCRT, or a similar system supporting ssh, is a required addition to your local workstation. See http://system.cs.fsu.edu/newusers/ for the latest information on support of SSH and how to get software.

Once you have an ssh client installed, you should begin to familiarize yourself with the electronic environment in the cs.fsu.edu domain. You are entitled to a login account which is essential to participation in this course. New students should see the information at http://system.cs.fsu.edu/newusers/newaccount/ to get started.

Work Rules

  1. Do your own work. This means:
    1. Do not copy any code from any source (electronic or printed) other than official course sources such as lecture slides, lecture scripts, and official course code library.
    2. Do not read any code from other students, and do not provide help for any other student in the class; this means you should neither send nor receive Email containing code with anyone other than course instructors.
    3. You may not read code off another person's computer screen.
    4. Do not seek help from anyone other than the instructors, and do not give help to anyone else in the class.
  2. Get help from your instructors, in class or in the designated discussion forum. This means:
    1. Discussion Board. The preferred method of seeking help is the class discussion board. The forums and topical threads therein provide a historical record of all questions, answers, and explanations. These are extremely useful to all students and can be accessed 24/7. Email may be used, but is appropriate only when code must be quoted or a private matter is concerned. For all other issues, the discussion board should be the primary interactive resource and archive.
    2. Email. To discuss personal matters or code (which should not be posted publicly), seek help from your instructors, in person or via Email. Always bring an up-to-date printout of your source code when seeking help in person. When using Email, put the code you want to discuss in the body of your Email and embed questions inside the code beginning with
      // Q: (insert question here)
      Remember, this is appropriate in Email to instructor(s) but not in a discussion forum (see below).
    3. It is perfectly OK to bring up anything in class (lecture, recitation, or discussion board), and it is encouraged that you participate in these discussions. You may use any material or information said, written, or handed out in class.
    4. You may not put more than two (2) lines of code in any public message (e.g., discussion forum or chat room). No code that is a solution to an assignment should be posted publicly.
  3. Keep your files organized
    1. Create a directory "cop4531" and do all work for this class inside that directory. Make sure this directory has permission code 700. (In the parent directory of cop4531, enter the command "chmod 700 cop4531".)
    2. Create a separate subdirectory, and work within that subdirectory, for each class project or homework assignment.
    3. When you have source code, we advise not keeping the object code or executable. This will save your disk space allocation. (An instance where time is cheaper than space.)
  4. Keep up with the course library.
    1. This course uses a progressive release of code files referred to below as the official COP 4531 Code Distributions and collectively as the official Course Code Library. New files are released throughout the semester. It is very important to keep abreast of when these are new files - what they are and what is inside of them.
    2. Make a symbolic link named LIB inside your cop4531 directory that points to the course library: /home/courses/cop4531p/fall10. This link will facilitate access to the library files when you need to look at or copy them.
    3. Details are given in the next section.
  5. Use only permitted C++ include files.
    1. You may use any C libraries.
    2. You may use the C++ I/O libraries and anything in your official code distribution libraries. Unless specifically authorized for a particular assignment, no other C++ libraries may be used. The I/O library header files are: iostream, fstream, and iomanip. (These are in the std namespace.)
  6. Unless specified otherwise, your programs will be tested and graded using the current version of the gnu g++ compiler on the machine program. You may choose to develop code in a different environment. However, it is your responsibility to test your code on program prior to submission. Note that files with non-unix (e.g., Windows) formatting characters will not be assessed.

Course Code Library

The programming side of this course is built around a library of code that is progressively released during the semester. This code is released to directories within the course home directory. Access to this library is limited to those in the class "group" which consists of students and instructors actively participating in the course this semester. The subdirectories making up the library are shown in the following table. All code distribution directories are in the "home" directory for this course, which is: ~cop4531p/fall10/. For example, the template code library is in the directory ~cop4531p/fall10/tcpp/.

  • Course Home
    ~cop4531p/fall10/

    contains all code sub-directories
  • Official Library
    cpp/
    tcpp/

    source code library (non-template code)
    template code library
  • Other Source Code
    tests/
    examples/
    partials/
    submitscripts/

    code for testing other code
    source code examples
    partially complete code files
    scripts for submitting assignments
  • Executables
    area51/

    executable programs

It is often useful to make copies of the distributed source code for your own use and also to copy executables for experimentation. However, whenever you use the code library in an assignment: make sure that you access the original versions of this code at the official site, not your copies. This is accomplished by always using absolute path specifications to the library directories in your compile statements.

It is important to achieve and maintain an understanding of all code distributed in these five directories. In particular, the student is responsible for complete understanding of the two code libraries cpp and tcpp, including:

  1. The public interface of each class or generic algorithm
  2. Client usage of each class or generic algorithm
  3. Implementation details of each class or generic algorithm

The code that is distributed is intended to be part of the required course material. The student should be familier with it in all details.

How to Work



Assignment Submission Process


Projects account for a large portion of the grade for this course, and probably for an even larger portion of learning. To get credit for your hard work, it is important to adhere to our project submission standards.

Each project is due before midnight (i.e., on or before 11:59:59 PM) on the due date. There is no room for individual flexibility on project (or homework) deadlines, because code releases for the class are timed to the project deadlines. Allowing an individual to turn in a project late would result in either giving that individual access to solutions, or delaying code distributions for the entire class. Neither option is viable, because we cannot extend the ultimate deadline -- the end of the semester. Early submission of assignments is acceptable, however, we cannot give early substantive feedback, projects submitted early will be assessed together with all other submissions.

In order to maintain uniformity, we will adhere to the time on shell.cs.fsu.edu. To check the time on shell:

All directories and files submitted should be named in accordance with the specifications listed in the assignment document. All filenames should be in lowercase unless otherwise specified. A makefile is required for most projects.

To submit project X:

  1. Copy the appropriate script file into the projX directory. This file will be named "projectXsubmit.sh", where "X" stands for the number of the project. (For example, "project3submit.sh" is the submit script for project 3.) The scripts may be copied from the directory (home)/submitscripts/
  2. .
  3. Change the permissions on the script file to rwx------; this is accomplished by entering the command "chmod 700 projectXsubmit.sh" in the project directory.
  4. Run the script by typing its name. This should result in an Email to one of the instruction staff containing a tarred version of your project directory. Look for the "elm" command indicating the script successfully sent the Email.
  5. Be sure to check your Email for a confirmation that your project submission was received. Save this Email. It is your time-stamped proof of submission in the unlikely event that your project gets lost.
  6. If you do not receive confirmation Email within a few minutes of submission, contact the instruction staff for further advice. Re-submit only if the elm send command is not issued.

Course Policies and Grading

The Course Syllabus is the primary source for course policies, including the following:


Reading and Reference Resources

The following reference books sanctioned for this course:

If you were looking for a good reference on C++, the Stroustrup book is a good choice. Stroustrup is the original inventor of C++ and remains active in its evolution.

The Cormen book is textbook for this course, COP 4531.

The Deitel book is the text used for our pre-requisit course COP 3330. This class assumes you are familiar with a good portion of Deitel, and it is certainly a good idea to keep this text handy if you already have it.

The Ford & Topp book is an excellent classical data structures text, and is recommended for students desiring more grounding in many of the topics covered in this course. It is easily purchased on the Web at, for example, http://www.varsitybooks.com (search for author "ford & topp").

The Austern book is an excellent trade book on the C++ Standard Template Library and Generic Programming. The author, Matthew Austern, developed one widely used version of the STL.

The O'Reilly books (make and emacs) are very handy references widely available, including directly from the publisher (toll-free number and http://www.ora.com).

Material from any of these books may be introduced by any participant (student or instructor) for discussion in the Lecture forum on the course web site, as long as the posting adheres to the previously stated prohibition on posting code. (See Work Rules above.)

Web Resources

The following resources are available on the web. The GNU sites have a wealth of free stuff, ranging from emacs to the gnu compilers. Various emacs help pages are listed, a DOS/Unix system, an html primer, and viewers for Postscript (.ps) and Portable Document Format (.pdf) documents.

Welcome to COP 4531!