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.
fruits.h@0:ff7b10a0e08f, 2015-08-28 (annotated)
- Committer:
- Jamess
- Date:
- Fri Aug 28 18:45:26 2015 +0000
- Revision:
- 0:ff7b10a0e08f
Trying to learn;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Jamess | 0:ff7b10a0e08f | 1 | #ifndef FRUITS_H |
| Jamess | 0:ff7b10a0e08f | 2 | #define FRUITS_H |
| Jamess | 0:ff7b10a0e08f | 3 | |
| Jamess | 0:ff7b10a0e08f | 4 | #include "mbed.h" |
| Jamess | 0:ff7b10a0e08f | 5 | |
| Jamess | 0:ff7b10a0e08f | 6 | class fruits{ |
| Jamess | 0:ff7b10a0e08f | 7 | |
| Jamess | 0:ff7b10a0e08f | 8 | private: |
| Jamess | 0:ff7b10a0e08f | 9 | |
| Jamess | 0:ff7b10a0e08f | 10 | uint32_t weight; |
| Jamess | 0:ff7b10a0e08f | 11 | /* |
| Jamess | 0:ff7b10a0e08f | 12 | */ |
| Jamess | 0:ff7b10a0e08f | 13 | |
| Jamess | 0:ff7b10a0e08f | 14 | public: |
| Jamess | 0:ff7b10a0e08f | 15 | |
| Jamess | 0:ff7b10a0e08f | 16 | |
| Jamess | 0:ff7b10a0e08f | 17 | fruits(); |
| Jamess | 0:ff7b10a0e08f | 18 | /** |
| Jamess | 0:ff7b10a0e08f | 19 | * Default Constructor |
| Jamess | 0:ff7b10a0e08f | 20 | */ |
| Jamess | 0:ff7b10a0e08f | 21 | |
| Jamess | 0:ff7b10a0e08f | 22 | uint32_t getWeight(void); |
| Jamess | 0:ff7b10a0e08f | 23 | /** |
| Jamess | 0:ff7b10a0e08f | 24 | * Returns the weight of the fruit |
| Jamess | 0:ff7b10a0e08f | 25 | */ |
| Jamess | 0:ff7b10a0e08f | 26 | void setWeight(uint32_t); |
| Jamess | 0:ff7b10a0e08f | 27 | /** |
| Jamess | 0:ff7b10a0e08f | 28 | * Sets the weight of the fruit |
| Jamess | 0:ff7b10a0e08f | 29 | */ |
| Jamess | 0:ff7b10a0e08f | 30 | }; |
| Jamess | 0:ff7b10a0e08f | 31 | |
| Jamess | 0:ff7b10a0e08f | 32 | #endif |