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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access