.c
and .h extensions.  Note that the command to run the C compiler is
(lowercase) cc.
.C
and .H extensions.  Note that the command to run the C++ compiler is
(uppercase) CC.
.H suffix.  For example, 
class Foo would be defined in the file
Foo.H.
.H suffix) is to be
guarded using the 
  #ifndef FOO_H
  #define FOO_H
        .
        .
  #endif
style.  This style is used to avoid multiple includes of the header.
.C) file.  The one exception: an accessor or a mutator
method for a data member may be done inline and defined in the
header file, outside the class definition.  
.C suffix.  For example,
the Foo class would be implemented in the file 
Foo.C. 
Note that each class has two associated files -- the definition or 
header file (.H) and the implementation file
(.C).  Exception: a pure abstract class will have just
the header file.
main function is to be in its own file, named
after the project and with a .C suffix.  For example, the
main function for project 3 would be in the file
Proj3.C.
Proj3 file.
The header file for a class presents the public interface for the class. We adopt the convention that class documentation is done in the header file. Implementation files may be documented also, but this is documentation for the programmer, not for the class user.
For an example of header file documentation, see the sample header below. You are encouraged to adopt this sample style. If you prefer your own style, that's ok, but it must meet the specifications laid out here.
Documentation of a class is to include the following information:
private.  You may document a data field if necessary for
clarity.
For projects in this class, use the following coding standard:
private, protected and 
public section in a class definition.  private
precedes protected precedes public.
private.
const variables 
globally - nothing else.
const variables for constants.
inline functions except accessors/mutators
for data members.  Define inline functions in the 
class header file, not in the implementation file.
virtual methods, provide a
virtual destructor.
const int MAXSIZE
  class DoubleLinkNode
  void SetSize(int)
  int growth_rateint growthRate
  
Makefile or
makefile, your choice.  
The grader will compile your submitted project by typing
'make,' so your makefile must correctly make your
project.  This includes correct naming of the executable.
See below for example makefiles.  The
examples can be easily modified for each project; change the
PROJ and SOURCES definitions and make the 
appropriate changes in the targets and commands.
The advanced makefile can be used to obtain a nice-looking printout of your code. Just type make print and a Postscript file will be produced, ready for printing on any Postscript printer.
The advanced makefile can also be used to submit your project.  As long as
you have SOURCES correctly defined, it will submit all the 
required files.  Just type make submit to submit your
project.  Note that the advanced makefile assumes that it is named
Makefile with a capital M.
Remember that the command lines following the target line are indented
by the TAB character, not by spaces.
/*
   PrintQueue.H
   PrintQueue class header file
   Project 1, CMSC 202, Section 101, Spring 1999
   Alan Baumgarten
   Created:  21 January 1999
   Current:  26 January 1999
*/
#ifndef PRINTQUEUE_H
#define PRINTQUEUE_H
 
/*
   This class simulates a queue of print jobs.
   There is no limit to the number of jobs in
   the queue.
*/
class PrintQueue {
private:
    char      _name[21];
    PrintJob* _head;
    PrintJob* _tail;
public:
    //  Default constructor.  Name is "Unnamed"
    PrintQueue();
    //  Construct empty PrintQueue with specified name
    //  Param queue_name:  Name of the queue (20 chars max.)
    PrintQueue (char* queueName);	
    //  Add a job to the queue
    //  Param job_ptr:  Pointer to the PrintJob
    //                 to be added
    void Enqueue (PrintJob* job_ptr);
    //  Remove a job from the queue
    //  Returns:  Pointer to first job in queue
    //  Pre-condition:  The queue must not be empty
    PrintJob* Dequeue ();
    //  Check to see if queue is empty
    //  Returns:  True if empty, false if not
    int IsEmpty();
};
#endif