It's now time to turn our attention back to the class diagram that we produced in Part Two of the book in order to develop a C# application based on that object-oriented blueprint. We'll step through all of the C# code necessary to automate a simple command-line version of the SRS application first, so that we may focus solely on what it takes to accurately model the SRS domain information in an OO programming language. Then, in the next two chapters, we'll round out our application by adding a means of persisting data from one session to another and a graphical user interface, respectively.
In this chapter, you'll learn how to represent all of the following object-oriented constructs in C# code:
Associations of varying multiplicities (one-to-one, one-to-many, and many-to-many), including aggregations
Static fields and methods
along with practical guidelines as to when to use these various constructs. We also cover a technique for testing your core classes via a command-line driven application.
As we discussed in Chapter 13, the formal C#-specific term for what we've been calling an "attribute" in Parts One and Two of the book is "field." Because we're now developing a real-life C# application, we'll be using the term "field" in the descriptive text throughout this chapter as well as in Chapters 15 and 16.