Kean University
Intro to Programming
Intro to e-Business
Intro to Programming
Decision Support Systems
Web Site Design
Caldwell College
Intro to Computers
Intro to Programming
Recycled Fiber Apparel
Little Jammies
Tie Dye Mania
Just Neon Tees
No Buttons Required
Panda Apparel LLC
Betty Boop Gear
Panda Imprinting
Custom Printed Boxers
Custom Printed Lounge Pants
Panda Formals
DSM Internet Services


C++ Program Requirements

Program Documentation

  1. Use meaningful variable/identifier names. i.e. test_score, gross_pay.
  2. A header block of comments at the beginning of the program including name, course, assignment number and a brief description of the program including any inputs, outputs and the purpose of the program.
  3. Comments before each function (excluding the main function) describing the purpose of the function.
  4. Any comments to help you or the instructor to better understand the program.

Program Formatting

  1. Each statement must begin on a new line.
  2. A blank line or other notation should be used to separate adjacent functions.
  3. Function headings should begin in the left margin.
  4. Statements within a function or block should be indented for readability:
       number_of_employees = 95;
       cin >> total_salary;
       avg_salary = total_slary / number_of_employees;
       cout << "Average salary is " << avg_salary << endl;
  5. An if-then-else structure should be indented for readability:
    if (expression) {
    } else {
  6. Compound boolean expressions should be enumerated on separate lines:
    if (expression) &&
       (expression) &&
       (expression) {
    } else {
  7. Program variables should be in lower case letters.
  8. Program constants should be in upper case letters.
  9. A consistent style should be maintained for readability.

To Print Program Output

  1. Execute (run) your program
  2. On the DOS window where the program ran (it says "Press any key to continue"), click on the little MS-DOS icon in the top left of the window
  3. Select EDIT
  4. Select MARK
  5. Position the pointer over the start of the text you want to copy
  6. Holding the left mouse button down, drag over the text you want to select until you reach the end of the area you want to copy
  7. Release the mouse button, highlighting the area to be copied
  8. click on the little MS-DOS icon in the top left of the window again
  9. Select EDIT
  10. Select COPY
  11. The highlighted text is now in the windows clipboard
  12. Paste the text into a word processor (notepad, wordpad, word, etc).
  13. Change the font to courier or any fixed width font and print the output


  1. Program design, style and clarity (50%)
    Includes header comments, program comments, variable names, formatting & whitespace, and modularity of design.
  2. Output correctness, style and comments (40%)
    Includes providing the correct output, properly formatted.
  3. Compliance with assignment (10%)
    Did the program do what the specs called for?

Hello.cpp sample:

/* Author: Scott Marino                  */
/* Assignment : Lab 1                    */
/* Date: 2/2/2004                        */
/* Description: A program to print out   */
/*              Hello World              */
#include <iostream>
using namespace std;

int main (void) {

   cout << "Hello World\n";
   return 0;


Copyright© 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 All rights reserved.