CSIS 211 Data Structures Style Guide.
The rubric for the assignments in this class shows a weight of 30% for following directions. Which means
that you need to follow this style guide closely. Failure to do so could cost you a loss of points.
1. Tools for this class. If you are writing your code in C++ then you must use Visual Studio 2022
community edition. If you are writing your code in C++ on a Mac you must use XCode. If you are
writing your code in Java you must use Apache NetBeans NetBeans 12.0 or greater.
2. Naming Conventions – Class and variable names will be written using camel case. Camel case is the
practice of writing phrases without spaces or punctuation.
a. Class names. All words in the class name begin with an uppercase character. Examples
would be
class HashTable,
class DoublyLinkedList
b. Method names. All functions / methods of a class will begin with a lowercase letter. All
subsequent words will begin with an uppercase letter. Examples would be
insertAtTop()
traverseToEnd()
Reference:
[Link]
d%20starting%20with%20either%20case.
3. Class member variable names. All variables that are members of the class will begin with a
lowercase m and follow the naming conventions outlined in section1. Example would be
int mLocalVariable;
double mReferenceToValue;
4. Pointers in C++. Member pointer variables must begin with mp. Examples would be:
mpHead
mpTail
5. Classes
a. All classes must be declared as public unless otherwise specified by the assignment.
b. You must have only one class per file unless otherwise specified by the assignment.
c. C++, all classes must have a header file and a corresponding .cpp file. If the class contains a
template then you should only have a header file and no .cpp file.
d. C++, no code allowed in the header file unless it is a template. This includes constructors.
e. Java, inner classes are not allowed unless specified by the assignment.
6. General Coding Rules
a. Each assignment consists of one project that could possibly have multiple tasks. You are to
submit one project that has the completion of all tasks. Multiple projects will not be
accepted for any assignment unless otherwise specified.
b. You must have a file named main that has the main function / method in it which is the
program entry point. Assignments submitted without a clearly defined main will not be
graded.
c. goto statements are not allowed in this class.
d. Console print or get statements are not allowed in accessor or mutator methods / functions.
e. C++ - all accessor functions must be const.
f. C++, all complex types must be passed by reference or pointer and must be made const
where they are not being modified.
g. C++, the use of auto variables is not allowed. You are required to type all variables.
h. C++, the use of return optional is not allowed. You must specify the type
i. C++, the use of __wrap_iter is not allowed. Use typename instead.
j. Java – with the exception of main static methods are not allowed unless specified by the
assignment
7. Submitting Assignments
a. Assignments must be submitted as a zip file that adheres to PKZip compression. This is
built into Windows. Other compression types will not be accepted.
b. The complete project folder is to be contained inside the zip file. Submissions of only
source code will not be accepted or graded. You must include the entire project folder.
c. The name of the zip file for submission must be in the following form:
First Initial + last Name + project + # an example would be
[Link]
8. Documenting your code. In this class you are required to extensively document your code. We
will be following Doxygen style comments. Normally, in C++ the comments would go in the
header file because the header is the first file read when trying to understand a person’s code.
In this class we will put comments above each function / method.
a. Example:
//#################################################
// @par Name
// getInstance
// @purpose
// Singleton that returns the instance of the class
// @param [in] :
// None
// @return
// The instance of the class
// @par References
// None
// @par Notes
// None
//###############################################
Foo &Foo::getInstance()
{
Each parameter should be labeled as either an input or an output and the name of the
parameter should be given
Your comment must contain all of the following @par types
Name
Purpose
Input – all parameters
Return
@param [in] :
myVar – The value used to set the class variable with.
b. Top of each file. A similar type comment must be at the top of each file in the following
format:
//##################################################
// File: [Link]
// Author: Glenn Stevenson
// Description: This file contains code for a linked list
// Date: December 12, 2020
//#################################################
Reference: [Link]