Difference between revisions of "OOP344 20131-OOP344geeks"

From CDOT Wiki
Jump to: navigation, search
(Coding Style)
(Programming Style)
Line 21: Line 21:
  
 
A. '''Indentation'''
 
A. '''Indentation'''
 +
* Using the 4 spaces(TAB) and inserting spaces
 
----
 
----
 
B. '''Blocks'''
 
B. '''Blocks'''
 +
<syntaxhighlight lang="cpp">
 +
int main()
 +
{
 +
    int name;
 +
    int first;
 +
    if (name == first)
 +
    {
 +
        cout << "name matches" << endl;
 +
    }
 +
}
 +
</syntaxhighlight>
 
----
 
----
 
C. '''Variable Naming'''
 
C. '''Variable Naming'''
 +
Variable name start with: First letter uppercase and rest are lowercase
 +
e.g:
 +
<syntaxhighlight lang="cpp">
 +
  int Age;
 +
  int Sex;
 +
</syntaxhighlight>
 +
----
 +
Fardad's Rule
 +
 +
<syntaxhighlight lang="cpp">
 +
int a; // good
 +
int b; // good
 +
int a, b. c; //bad
 +
int
 +
    a; // bad
 +
Single line blocks must be surrounded by { and }
 +
if(whatever)
 +
{
 +
  do this:
 +
} // good
 +
if(whatever) do this; //bad
 +
  if(whatever)
 +
  do this; // bad
 +
 +
</syntaxhighlight>
  
 
== Team Discussion ==
 
== Team Discussion ==

Revision as of 22:18, 14 February 2013

OOP344geeks (Team 6)

Team Member's Information

Email to all members

First Name Last Name Section Seneca ID Wiki ID IRC nick Github ID Blog URL
Pankaj Sama B psama Pankaj Sama pankaj pankajsama01 Pankaj's Blog
Vivek Patel B vrpatel13 Vivek Patel vivek vivek5255 Vivek's Blog
Divya Sharma B dsharma37 Divya Sharma Divya divya5 Divya's Blog
Koghulan Namasivayam B knamasivayam1 Koghulan Namasivayam koghulan_ kogu Koghulan's blog

Programming Style

A. Indentation

  • Using the 4 spaces(TAB) and inserting spaces

B. Blocks

int main()
{
    int name;
    int first;
    if (name == first)
    {
        cout << "name matches" << endl;
    }
}

C. Variable Naming Variable name start with: First letter uppercase and rest are lowercase e.g:

  int Age;
  int Sex;

Fardad's Rule

 int a; // good
 int b; // good
 int a, b. c; //bad
 int
    a; // bad
 Single line blocks must be surrounded by { and }
 if(whatever)
 {
  do this:
 } // good
 if(whatever) do this; //bad
  if(whatever)
  do this; // bad

Team Discussion

Issues and Working Tasks

Help Needed