Make ProgramEntry members private and create accessors to them.

Previously, ProgramEntry's members were only validated if you called the
constructor with the members passed in. If you instead called the
default constructor then specified each member individually, the
validation wasn't called. I changed this to validate each member as
they're assigned so the validation will always be used.