.

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
Showing posts with label Classes In C#. Show all posts
Showing posts with label Classes In C#. Show all posts

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.

Tuesday, October 26, 2010

How To Declare Classes in C#, Tutorial,

In previous article we discussed What is Compilers? . Now we will Ho To Declare Classes In C#.



Consider the following code example, which defines a class :

public class Hello
{
           
public static void Main(string [ ] args)

           
{

               
System.Console.WriteLine ("Hello, World! \n");

               
}

}

Wednesday, October 6, 2010

What is Compilers? Use of Compilers in C-Sharp

Previous Article

All languages have a vocabulary, which is a list of words that have a specific meaning in that language. Languages also have their own grammar rules, which state the rules, which state the rules for combining words to form sentences.

This is what ensures that whatever is spoken in a particular language is interpreted similarly by all people who understand the language. Similarly, programming languages also have a vocabulary , which is referred to as the set of keywords of that language, and a grammar, which is referred to as the syntax.

Saturday, July 17, 2010

Introduction to Classes in C# Tutorial

Previously I introduced you Objects in C#. Today I'll give you the introduction of Classes in C#

Look at the world around you. It is full of objects of various shapes, sizes, colors and behavior. For example,  the earth is inhabited by millions of animals. A zoologist cannot do any meaningful study of these objects without organizing this vast variety of animals found in the world in a logical manner. Thus, the zoologists have classified animals into kingdoms, genus, families and species.

All animals and birds, which are essentially objects, can be classified on the basis of their common attributes. For example, the peacock, the sparrow and the kingfisher are all birds. All of them share characteristics that are common to the family of birds. All of them lay eggs, are covered with feathers, have hollow bone structures and have the ability to fly. Therefore, they share structural and behavioral similarities and belong to the class called Birds.
Related Posts with Thumbnails