-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding simple style guides * Update style.hpp
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
This file correspondes to style.hpp and is an example of | ||
the .cpp files that would correspond to the .hpp file. | ||
*/ | ||
|
||
|
||
#include "style.hpp" | ||
|
||
|
||
char TestClass::attrTwoTimesTwo() | ||
{ | ||
return c_attrTwo << 1 | ||
} | ||
|
||
int TestClass::getAttrSum() | ||
{ | ||
return c_attrTwo + i_attrOne | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
This file contains the style of each programming construct | ||
to use in this project. | ||
It should be followed to the letter! All spaces are | ||
necessary! Make sure to take note of camel case and other | ||
variable naming schemes! | ||
*/ | ||
|
||
// Header File: | ||
class TestClass | ||
{ | ||
public: | ||
// Constructors | ||
TestClass(int AttrOne, char AttrTwo); | ||
// Mutator methods | ||
int getAttrSum(); | ||
char attrTwoTimesTwo(); | ||
void setAttrOne(int newAttrOne) { i_attrOne = newAttrOne } | ||
void setAttrTwo(char newAttrTwo) { c_attrTwo = newAttrTwo } | ||
// Accessor methods | ||
int getAttrOne() { return i_attrOne } | ||
char getAttrTwo() { return c_attrTwo } | ||
private: | ||
// Private variables | ||
int i_attrOne = 0; | ||
char c_attrTwo; | ||
}; |