I recently read the Calendar API for Java online, and something interesting to me was that they used singular get and set functions rather than getMonth/setMonth,getDate/setDate for manipulating all the fields. I think this allows for easily manipulating the fields and allowing ease of addition of new attributes to get and set.
int Get(int field);
int Set(int field, int value);
Problem: How to set something that has no easily translatable integer/enumerator.
In Calendar, this problem did not happen because months and days of the week both have a easy enumerator. Can count 1 to 12 and 1 to 7, or make an enumerable type for both.
What can I do about Pokemon names or Pokemon moves?
I recently read the Calendar API for Java online, and something interesting to me was that they used singular get and set functions rather than getMonth/setMonth,getDate/setDate for manipulating all the fields. I think this allows for easily manipulating the fields and allowing ease of addition of new attributes to get and set.
int Get(int field);
int Set(int field, int value);
Problem: How to set something that has no easily translatable integer/enumerator.
In Calendar, this problem did not happen because months and days of the week both have a easy enumerator. Can count 1 to 12 and 1 to 7, or make an enumerable type for both.
What can I do about Pokemon names or Pokemon moves?