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.
Revision 2:0224a34c9243, committed 2019-08-08
- Comitter:
- kaushalpkk
- Date:
- Thu Aug 08 18:47:28 2019 +0000
- Parent:
- 1:2bc647d6c00d
- Commit message:
- added double stars to comments
Changed in this revision
| Shape.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Shape.h Thu Aug 08 18:44:24 2019 +0000
+++ b/Shape.h Thu Aug 08 18:47:28 2019 +0000
@@ -3,48 +3,48 @@
#include "mbed.h"
-/*
-A library to create square and rectangle objects. calculates the area and perimeter
-
-Example:
-@code
-
-#include "mbed.h"
-#include "Shape.h"
-
-Shape rect(3,4);
-Shape squr(1);
-
-int main() {
- printf(" area of rect = %d \n", rect.getArea());
- printf("perimeter of square = %d \n", squr.getPerimeter());
-}
-
-@endcode
-
+/**
+* A library to create square and rectangle objects. calculates the area and perimeter
+*
+* Example:
+* @code
+*
+* #include "mbed.h"
+* #include "Shape.h"
+*
+* Shape rect(3,4);
+* Shape squr(1);
+*
+* int main() {
+* printf(" area of rect = %d \n", rect.getArea());
+* printf("perimeter of square = %d \n", squr.getPerimeter());
+* }
+*
+* @endcode
+*
*/
class Shape{
public:
- /* create an object for square
+ /** create an object for square
* @param x integer value for a side on square
*/
Shape(int x);
- /* create an object for rectangle
+ /** create an object for rectangle
* @param x integer value for length of rectangle
* @param y integer value for breadth of rectangle
*/
Shape(int x, int y);
- /* returns to area of rectangle/square
+ /** returns to area of rectangle/square
* @return returns the area of rectangle/square
*/
int getArea();
- /* returns to perimeter of rectangle/square
+ /** returns to perimeter of rectangle/square
* @return returns the perimeter of rectangle/square
*/
int getPerimeter();