Web.com Web Hosting
Sign up for PayPal and start accepting credit card payments instantly.


Hello If you are new here, so you might want to subscribe for my feed so Subscribe in a reader. Or bring updates In Your Email

Saturday, April 14, 2012

Resilience To Change in C# Tutorial

Previous Article 

My dear readers,
                          After a long time I'm back on my blog. From last one and a half year I was busy building my business Assorted Collection. This is my retail store in my home town Agra. From now on I will give time to my passion "Blogging". Last time we discussed about How TO Create Objects in C#. Today we will discuss resilience to change in C#

Resilience To Change

The object-oriented approach allows systems to evolve. When a change is suggested, the old system need not to be completely abandoned. consider the example of Lovable Toys, Inc, is a company that manufactures toys for children in the age group of 1 to 12. its car toys are popular with children because of their attractive colors, shape and sound.

For a couple of years, the company had no cause for complain about the design of the toy car. However, due to advancement in technology and increasing competition, the designers now want to stop manufacturing the old car because the market requirements have changed. They want the company to manufacture a car that has flashing lights is remotely controlled.

In the object-oriented system, this requirement does not mean that the new car needs to be built from scratch. The new features can be easily incorporated in the old toy car without modifying the color, shape and sound of the old toy car.

Resilience to change also results in easier maintenance. this feature of object-oriented methodology is known as extensibility. The ability of a class to inherit features from another class also makes object-oriented programs more extensible. For the same reason, even during construction, parts of the system under development can be refined without any major changes to other parts.

Existence as Different Forms

Using the object-oriented approach, objects can be made to respond differently to the same message. The response is decided based on the information or parameters provided with the message.

if a car collides against an object, the behavior of the car after the collision will depend on the speed of the car and nature of the object that hit the car. For example, if the car collides with another car at high speed, both the cars will be smashed and the drivers might get injured. on the other hand, if a car collides with a street light at a slow speed, the impact would be less. The ability to react differently based on the information associated with the message is known as polymorphism.

No comments:

Post a Comment

Related Posts with Thumbnails