Introduction
We introduced the basic terminology and concepts of object-oriented programming in Section 1.17. In Chapter 3, you began to use those concepts to create simple applications that displayed messages to the user, obtained information from the user, performed calculations and made decisions. One common feature of every application in Chapter 3 was that all the statements that performed tasks were located in method Main. Typically, the applications you develop in this book will consist of two or more classes, each containing one or more methods. If you become part of a development team in industry, you might work on applications that contain hundreds, or even thousands, of classes. In this chapter, we present a simple framework for organizing object-oriented applications in C#.
First, we explain the concept of classes using a real-world example. Then we present five complete working applications to demonstrate how to create and use your own classes. The first four of these examples begin our case study on developing a grade-book class that instructors can use to maintain student test scores. This case study is enhanced over the next several chapters, culminating with the version presented in Chapter 8, Arrays. The last example in the chapter introduces the type decimal and uses it to declare monetary amounts in the context of a bank account class that maintains a customer's balance.