Summary

for RuBoard

In this chapter we studied, in detail, the object-oriented aspects of C#, with an emphasis on inheritance. After a review of the fundamentals of object-oriented programming, we introduced the Acme Travel Agency case study, which runs as a strand throughout the entire book. We examined the suitable abstractions that enable us to implement a reservation system for a variety of resources that must be reserved, and we provided an implementation of a hotel reservation system. The abstract base classes we defined provide reusable code that can enable us to easily implement other kinds of reservation systems. The key is finding the right abstractions.

We saw how C# language features facilitate object-oriented programming. Certain details of C#, such as use of access control (public, private and protected) and properties can help express abstractions in a way that is safe and easy to use.

We concluded the chapter by looking at other object-oriented features of C#, such as virtual methods , method hiding, method overriding, and polymorphism. A pitfall in languages supporting inheritance is the fragile base class problem, and we have seen how C# helps in avoiding this pitfall.

for RuBoard


Application Development Using C# and .NET
Application Development Using C# and .NET
ISBN: 013093383X
EAN: 2147483647
Year: 2001
Pages: 158

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net