![](/media/cache/profiles/c3d4543d921d3fc90cabc2c864c68276.jpg.50x50_q85.jpg)
exercises
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 |