10.4. Identifying Fields

To determine what the fields for each of our domain classes should be, we make yet another pass through the requirements specification looking for clues. We already stumbled upon a few fields earlier, when we weeded out some nouns/noun phrases from our candidate class list:

  • For the Section class, we identified "day of week", "room", "seating capacity", "semester", and "time of day" as nouns or noun phrases that would be represented as fields in the Section class.

  • For the Student class, we identified "degree" as noun that should become a field of the class.

We can also bring any prior knowledge that we have about the domain into play when assigning fields to classes. Our knowledge of the way universities operate, for example, ...

Get Beginning C# 2008 Objects: From Concept to Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.