Carey Brown wrote:Your requirements are a bit vague and it's hard to know what you're really shooting for, but here's a stab at it...
I like your method of getting the data - ie, an array of field names - but not your final structure. You might want to read the
StringsAreBad page to find out why.
Personally, I'd say there are at least two types in play here: a
Student, and a
User. Now in many cases they may refer to the same
person, but that doesn't necessarily mean they're the same
thing. A
User could possibly also be a teacher, or an admin; and I doubt that a
Student can't exist without being a
User of the system.
Just a few of the things you need to consider when thinking about types (or classes).
HIH
Winston