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.cpp@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 | #include "fruits.h" |
| Jamess | 0:ff7b10a0e08f | 2 | |
| Jamess | 0:ff7b10a0e08f | 3 | fruits::fruits(){ |
| Jamess | 0:ff7b10a0e08f | 4 | |
| Jamess | 0:ff7b10a0e08f | 5 | weight = 10; |
| Jamess | 0:ff7b10a0e08f | 6 | |
| Jamess | 0:ff7b10a0e08f | 7 | } |
| Jamess | 0:ff7b10a0e08f | 8 | |
| Jamess | 0:ff7b10a0e08f | 9 | void fruits::setWeight(uint32_t newWeight){ |
| Jamess | 0:ff7b10a0e08f | 10 | |
| Jamess | 0:ff7b10a0e08f | 11 | weight= newWeight; |
| Jamess | 0:ff7b10a0e08f | 12 | |
| Jamess | 0:ff7b10a0e08f | 13 | } |
| Jamess | 0:ff7b10a0e08f | 14 | uint32_t fruits::getWeight(void){ |
| Jamess | 0:ff7b10a0e08f | 15 | |
| Jamess | 0:ff7b10a0e08f | 16 | return weight; |
| Jamess | 0:ff7b10a0e08f | 17 | |
| Jamess | 0:ff7b10a0e08f | 18 | } |