Now you have learnt what a class is in programming language.
Actually above definition was in general term.
But we can define it in programming language like:
CLASS- > Set of attribute (variable) or behavior (method) that is shared by all the object of a particular type is called class. It is a blue print for creating the object.
Now I’ll discuss the object.
What is an Object?
In Real life we see many things we can say all are object.
Like TV, computer, dog, ram (name of a boy), CPU, keyboard etc all are object.
I n programming language an object is an entity mean that has existence.
Whether it logical or physical.
Logical means we can’t touch it. Like XP operating system, Vista.
Physical means we can touch it. Like dog, cat, computer, TV etc.
In other words object is an instance of a class.
Suppose you are an object and your name is Ram.
Then Ram would be an object of human_beings class.
We can identify an object very easily.
Object has thee characteristics by which we can easily identify it.
1. State->set of attribute and their values is called state.
Suppose car is an object of a Automobile class.
Then every car has some state like
Speed=0, color=”red”, no_of_wheel=4 etc.
For example -> you are an object that means you have a state.
What is your set of attribute?
Your height, weight, no_of_hands, complexion etc.
And if put some value to your attribute that is called your state.
2. Identity->Identity is one of the most important characteristics of Object by which
we can easily identify an object.
Suppose you are an object then what is identification marks?
Your finger print is identification marks.
Suppose a computer is an object then its model number is its identification marks.
3. Behavior-> in general term any task that is performed by an object is called Behavior. In programming language it is called method as well.
For example -> suppose you are an object what would be your behavior.
You can speak, you can walk, you can talk, you can write.
Above discussed verb like walk, move, talk, write
all these are your method or we can say behavior.
Now it seems to me that you can understand that
What an object is in programming language?
About Me
Friday, January 22, 2010
Tuesday, January 19, 2010
Some Basic Concept in C# programming.
Today i'll write a topic in C# programming that would clear your concept regarding some basic terms like
1.class
2.object
3.Methods
->Some Basic point in C#
1.what is a class in programming language?
we see many things in real life for example computer,cow,lion,mixer,cd player,mouse,ram(a humanbeings or name of a man),printer,tree and etc.you know it is an object.i'll discuss it later.
first we categorized it according to their behaviour and some properties into a group this logical group makes a class.
suppose we categorize cow,lion,Goat into one group that makes a class and we can say Animal .
That means Animal is a class where each animal belongs.
And According to my defination some properties of cow like four foots,two ears and one mouth each has those things that'why we categorized into animal ..now we can eaisly catrgorized other things like cd player,Tv into electornics device and we can give a name it "ELECTRONICS DEVICE " that is a class.
A simple class is declared in C# like
class Animal
{
}
wherer class is keyword(keywords are the word that has special meaning in programming language )
and Animal is name of class..
Now I'll disscuss about object next day.
1.class
2.object
3.Methods
->Some Basic point in C#
1.what is a class in programming language?
we see many things in real life for example computer,cow,lion,mixer,cd player,mouse,ram(a humanbeings or name of a man),printer,tree and etc.you know it is an object.i'll discuss it later.
first we categorized it according to their behaviour and some properties into a group this logical group makes a class.
suppose we categorize cow,lion,Goat into one group that makes a class and we can say Animal .
That means Animal is a class where each animal belongs.
And According to my defination some properties of cow like four foots,two ears and one mouth each has those things that'why we categorized into animal ..now we can eaisly catrgorized other things like cd player,Tv into electornics device and we can give a name it "ELECTRONICS DEVICE " that is a class.
A simple class is declared in C# like
class Animal
{
}
wherer class is keyword(keywords are the word that has special meaning in programming language )
and Animal is name of class..
Now I'll disscuss about object next day.
Saturday, January 16, 2010
DATA TYPES IN C#
DATA TYPES IN C# :
First of all we have to understand that what is a data type ?
Data types specifies that which type of value will be contained by a
variable either integer or character or etc.
some data types is given below.
in next blog i'll discuss how to accept and display the different data types in screen
First of all we have to understand that what is a data type ?
Data types specifies that which type of value will be contained by a
variable either integer or character or etc.
some data types is given below.
- int
- string
- char
- bool
- float
- double
- byte
- long
- short
in next blog i'll discuss how to accept and display the different data types in screen
Step By Step C# program
Today I am going to write a Blog in which I will writer how to learn C# programming.
I will give you simple and easy way idea by which you can easily write a program.
Here you can ask any question in C#.
Now I am going to write step by step C# ’s program.
using System;
class First
{
public static void Main()
{
Conosle.WriteLine("Welcome to C# programming");
}
}
I will give you simple and easy way idea by which you can easily write a program.
Here you can ask any question in C#.
Now I am going to write step by step C# ’s program.
using System;
class First
{
public static void Main()
{
Conosle.WriteLine("Welcome to C# programming");
}
}
Subscribe to:
Posts (Atom)