CPS 108, Software Design and Implementation, Spring 1997


Object-oriented programming, design,and analysis

[ Requirements | Syllabus | Books | Assignments | Code | Project | Groups | Teaching| Tools ]


Fill out a non-green sheet course evaluation. You're also invited to submit a self-evaluation regarding your performance in the course.

Overview

A description of the course and an overview of what is covered.

Local Java links and information about compiling Java in the acpub environment.

Class Roster

Cocoon groups


Requirements

There will be a small group project (three person teams), a medium project (four person teams) and a large project (six+ person teams).

There will be two individual mastery projects.: one in C++, one in Java. The mastery projects are designed to ensure that everyone who completes the course is "certified" as capable of writing and understanding reasonably complex C++ programs. Since some people on the large team project may not write as much code as others, the mastery projects are necessary for this certification.

There will be six small programs: three in C++ and three in Java. Doing all these projects is necessary for an A.

Grading
small programs, class presentation, class participation 10 %
mastery exams 30 %
small group project 10 %
medium group project 20 %
large group project 30 %

In general, to earn an A on any assignment you must go beyond what is expected. Meeting all requirements well is a B+. Meeting all requirements in a way that exceeds expectations can earn an A-. Doing more than is required, or doing astonishingly good work are required for an A.


Syllabus

The syllabus has information about readings and topics for discussion.

Assignments

* oodle

* Ola Oodling

Stage one due January 24
Stage two due January 27
Final stage three due February 3

Late breaking news on extensions and what to turn in

Oodle is a 3-person group assignment. Here are the groups.

Several classes already written may be useful in developing Oodle. These include standard string/Vector classes as well as classes for data structures and for reading/processing directory entries. A separate page of classes for Oodle code is accessible, some of the links are duplicated below in the code section.

* COCOON

Each group member must fill out a group evaluation form or will lose a full letter grade on the final assignment.

Demo times are available, please sign up during class or via email.

* Jotto optional word game program (no GUI involved)

Mastery Exams for C++

* templated deque
This is a solo mastery

* intelligent numbers
A hierarchy of smart numbers

* Tracking Strings Efficiently
Efficient string processing, the benchmark/code page shows benchmarks to beat and some sample code.

Mastery Exams for Java

* Sliding Puzzle
This is a group mastery


Code Examples

Compiling/Paths


Compiling

You must use g++ 2.7.2.1 for the projects in this course. This compiler implements exceptions, run-time type identification, and fixes some bugs in 2.6.x. It also fixes some problems with the debugger that aren't fixed in 2.7.2. To use this compiler on the acpub system, you'll need to change your path. Add the line below to your .cshrc file to put /afs/acpub/project/cps/bin before /usr/local/bin in your path.
     set path  = (/afs/acpub/project/cps/bin $path)
If you want my bin in your path (for submit to work) you should add /afs/acpub.duke.edu/users8/ola/bin at the end of your path, otherwise you'll need to type ~ola/bin/submit108 to use the submit program.

You'll need to change your path to have access to Java, the ddd debugger, and some other tools --- you must include /afs/acpub/project/cps/bin in your path.

Compiling on CS machines

For the moment, to use g++ 2.7.2.1 on CS machines, you'll need to put /usr/pkg/gcc-2.7.2.1/bin before /usr/local/bin in your path. The latest version of g++/gcc should be the default, but it's not.

Emacs

If you don't use emacs/xemacs, I urge/require you to start. Emacs has built-in support for RCS, debugger support, etc. etc. You should use xemacs since it has built-in Java support, it's color coded, it has a good HTMl mode and so on. Since xemacs/emacs support RCS, and since you'll use RCS from the start, you will be very wise if you decide to use emacs.

Debugging

The debugger ddd is much better than gdb/xxgdb. It uses gdb underneath, but has a very nice GUI. You should use ddd version 2.0. This should be the default on acpub machines, but on CS machines you'll need to put u/sr/pkg/ddd-2.0 in your path.

Code Examples: C++/Java

* Java in a Nutshell All the examples from the O'Reilly book Java in a Nutshell. These are accessible here, as source and runnable applets, and also in ~ola/cps108/nutshell on both cs and acpub machines.

Network code from nutshell book updated by ola to 1.1 (examples 7.5 and 7.6, Client Server)

* Templated map classes including an abstract base class and two implementations: unsorted vector and hash table

* A word tracking program (counts # occurrences of all words in a file) that uses map classes is available.

* Two views of a menu-driven program for manipulating images. One is non-object oriented (although there is a class used). The other is very object oriented and uses the Command Pattern to implement commands used within menus (the menus are text based).

First the non object oriented version

The object oriented version (uses the Pixmap class too)

* A class for checking memory leaks (very rudimentary) by overloading new and delete on a global basis

* Examples using low-level read system calls.
Examples in C/C++

* Small example using strtok

In class design exercises. Programming in the small and in the large

* TBA

* TBA


Books

There are several books we'll use in the course
* Object-Oriented Design Heuristics by Arthur Riel
* Design Patterns: Elements of Reusable Object-Oriented Software by the "gang of four"
* Mastering Object-Oriented Design in C++ by Cay Horstmann

* Java in a Nutshell by Flanagan
* The Mythical Man-Month by Fred Brooks

Optional Books

* Core Java (second edition) by Gary Cornell and Cay Horstmann
* Effective C++: 50 Specific Ways to Improve Your Programs and Designs by Scott Meyers
Books on Reserve
* Debugging the Development Process by Steve Maguire

Teaching staff

Support personnel: one professor, two TAs (one TA, one or more UTAs)
* Professor Owen Astrachan

* TA Srikanth Srinivasan
* UTAs TBA

Groups

* Groups Groups for the first assignment Oodle have been formed


Project

Information not yet available

Programming Tools

* GetOpt
Information on parsing command line arguments

* the read system call
Examples using read and lseek to do low-level file reading.

* using templates
How to instantiate templated classes when using g++ (and some other compilers that don't generate template repositories).

* gprof
Information on profiling programs

* tar
Information on using tar

* A guide to Makefiles written by UTA Garrett Mitchener.

* Local Java links

* RCS is a revision control system. It should be used for all group projects. The link is a local guide to RCS.


Back to Owen Astrachan's home page