Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Shape.h
- Revision:
- 0:3f07a74c8248
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Shape.h Thu Feb 14 12:04:39 2019 +0000
@@ -0,0 +1,22 @@
+
+/*
+the header file consists of the declaration of the shape class and
+declaration of function and variables in the class
+
+*/
+
+
+class Shape{ //class declaration
+ public: // the content underneath the public are accessible outside the class
+ //constructors
+ Shape(int);
+ Shape(int, int);
+
+ //functions
+ int getArea();
+ int getPerim();
+ void printInfo();
+
+ private: //the private variables are not accessible outside the class.
+ int _a, _b; // a personal choice to have the variable names start with an '_'
+};
\ No newline at end of file