Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. OOA&D > Task List

Task List

image

In this chapter, we’ll start by looking at the three kinds of relationships that can exist between types, and then back up a bit to examine the fundamental principles of object-oriented programming. Finally, we’ll examine the C# modifiers that allow you to control how the types in your application interact.

Type Relationships

image

We’ll begin by exploring the four types of relationships that can exist between types, IsA, HasA, CanDo and CanBe, and how they’re represented in the .NET Framework.

OOP Principles

image

There are four basic principles that are fundamental to object-oriented programming: ABSTRACTION, the elimination of unnecessary or irrelevant detail; INHERITANCE, the ability of types to inherit behavior from a base; ENCAPSULATION, the hiding of implementation details; and POLYMORPHISM, the ability of derived classes to be substituted for their ancestors. We’ve already seen examples of all of these principles, but in the second section of this chapter, we’ll examine the principles themselves, and how to implement them in your class hierarchies.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint