Engineering Science 1036A/B Lecture 9: C++ Basics: Programming Style & Documentation

9 views2 pages
Comments
Include summary at beginning of the program to explain what the program
does, its key features, its supporting data structures, and any unique techniques
it uses
Include name, class section, instructor, date, and brief description at beginning
of the program
Naming Practices
Choose meaningful and descriptive names
Variables and function
Use lowercase
If the name consists of several words, use lowercase for the first word,
and capitalize the first letter of each subsequent word in the name
Class names
Capitalize the first letter of each word in the name
Constants
Capitalize all letters in constants, and use underscores to connect words
Proper Indentation and Spacing
Indentation
Indent two spaces
Spacing
Use blank line to separate segments of the code
Block Styles
Programming Style & Documentation
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents