Create the Drawn Pattern class

The underlying structure of the drawn pattern is an ordered collection of points in a 60-by-60-pixel grid. The user creates the pattern by drawing a line from one point to the next in connect-the-dots fashion. The following illustration from a test version shows the list of points and the resulting pattern. Add a new class to the project. Name it DrawnPattern. Add an Imports or using statement at the beginning of the DrawnPattern source file to include the System.Drawing namespace. The points...

Design Considerations for Properties

When designing and implementing properties, the following considerations apply Properties can be read-write, read-only, or write-only. A read-write property can be retrieved and set by client code. A read-only property can only be retrieved and a write-only property can only be set. Write-only properties are rare. Developers tend to use write-only properties to send data to hardware devices so that the value sent to the device can't be retrieved later. Use a read-only property when the property...

Pascal Casing and camel Casing

In .NET applications, you'll find two styles of capitalization Pascal Casing and camel Casing. When you use Pascal Casing, you capitalize each word in an identifier the name of something , just as both Pascal and Casing are capitalized. Examples include FirstName and LastName. Using camel Casing, you capitalize every word except the first word of the identifier. Examples include firstName and lastName. The capitalized letter in the middle of the identifier might remind you of a camel's hump....

Create the Savings Account class

On the Project menu, click Add Class. The Add New Item dialog box appears. 2. Name the file SavingsAccount.vb or SavingsAccount.cs, depending on the language you're using. 3. Modify the class declaration to indicate that BankAccount is the base class as shown here 10. public class SavingsAccount TheBank.BankAccount If you're using Visual Basic, the following message appears in the Task List Cannot implicitly create a constructor for 'Class SavingsAccount' because its base class 'BankAccount'...

Install the practice files

Follow these steps to install the practice files on your computer's hard disk so that you can use them with the exercises in this book. 1. Remove the companion CD from the package inside the back cover of this book and insert the CD in your CD-ROM drive. 2. Double-click the My Computer icon on the Desktop. Tip On some computers, the startup program might run automatically when you close the CD-ROM drive. In this case, skip steps 2 through 5 and follow the instructions on the screen. 3....

Create the Checking Account class

On the Project menu, click Add Class. The Add New Item dialog box appears. 2. Name the file CheckingAccount.vb or CheckingAccount.cs, depending on the language you're using. 3. Modify the class declaration to indicate that BankAccount is the base class as you see here 5. Public Class CheckingAccount 10. public class CheckingAccount TheBank.BankAccount

Use an instance of the Book class

Add the following code after the cookies code to display some of the text of the two books. In later chapters, you'll learn other ways to return the text of a particular page in the book. 5. report Page amp page.ToString amp ControlChars.CrLf _ 6. amp fairyTales.Title amp amp fairyTales.GetPage page _ 8. amp Cookies amp cookies.GetPage page 10. report Titles fairyTales.Title amp and amp cookies.Title 15. report Page page.ToString n 16. fairyTales.Title fairyTales.GetPage page n 17....