Example 2 (4)
Problem: This data representation admits improper values (e.g., m = 0; or m = 2 and d = 30).
Constructors and methods can (should) be coded to avoid improper values. E.g.:
Date today = new Date(2001, 2, 30);
But what if the data representation is accessed directly?
Date today = new Date(2001, 2, 14);today.d += 16;