SpringBoard / Mbed 2 deprecated SB_C_Classes

Dependencies:   mbed

Committer:
kaushalpkk
Date:
Thu Feb 14 12:04:39 2019 +0000
Revision:
0:3f07a74c8248
...

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kaushalpkk 0:3f07a74c8248 1
kaushalpkk 0:3f07a74c8248 2 /*
kaushalpkk 0:3f07a74c8248 3 the header file consists of the declaration of the shape class and
kaushalpkk 0:3f07a74c8248 4 declaration of function and variables in the class
kaushalpkk 0:3f07a74c8248 5
kaushalpkk 0:3f07a74c8248 6 */
kaushalpkk 0:3f07a74c8248 7
kaushalpkk 0:3f07a74c8248 8
kaushalpkk 0:3f07a74c8248 9 class Shape{ //class declaration
kaushalpkk 0:3f07a74c8248 10 public: // the content underneath the public are accessible outside the class
kaushalpkk 0:3f07a74c8248 11 //constructors
kaushalpkk 0:3f07a74c8248 12 Shape(int);
kaushalpkk 0:3f07a74c8248 13 Shape(int, int);
kaushalpkk 0:3f07a74c8248 14
kaushalpkk 0:3f07a74c8248 15 //functions
kaushalpkk 0:3f07a74c8248 16 int getArea();
kaushalpkk 0:3f07a74c8248 17 int getPerim();
kaushalpkk 0:3f07a74c8248 18 void printInfo();
kaushalpkk 0:3f07a74c8248 19
kaushalpkk 0:3f07a74c8248 20 private: //the private variables are not accessible outside the class.
kaushalpkk 0:3f07a74c8248 21 int _a, _b; // a personal choice to have the variable names start with an '_'
kaushalpkk 0:3f07a74c8248 22 };