Changes between Version 1 and Version 2 of Properties
- Timestamp:
- 11/03/12 20:53:46 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Properties
v1 v2 2 2 3 3 == Introduction == 4 5 Properties provide a way to get and set the values that characterize an object. A business application could have a Customer class with properties .name, .address and .id. A video game could have a GameObject class with properties .position, .velocity and .health. 6 7 == Syntax == 4 8 5 9 to-do … … 7 11 == Compared to Methods == 8 12 9 * Methods can nottake parameters.13 * Methods can take parameters. 10 14 * In practice, methods are not systematically enumerated and invoked. 11 15 * Methods may perform substantial calculations and/or I/O.