What are the attributes of class computer language?
Answers
Answered by
0
I will presume that you are talking about class from the object-oriented programming paradigm.
In object-oriented paradigm, a class is a set of parameters that we can define for a particular instance. These parameters are called the attributes of a particular class.
For example, let us consider a class called animals. The following will be attributes that we will define in the class:
1. no of legs
2. has fur
3. walks on # legs
4. has claws
5. has beak
So, now when we invoke an object (an object is an instance of the class), the object will have the values for the attributes.
object cat:
1. no of legs - 4
2. has fur - yes
3. walks on # legs - 4
4. has claws - yes
5. has beak - no
In object-oriented paradigm, a class is a set of parameters that we can define for a particular instance. These parameters are called the attributes of a particular class.
For example, let us consider a class called animals. The following will be attributes that we will define in the class:
1. no of legs
2. has fur
3. walks on # legs
4. has claws
5. has beak
So, now when we invoke an object (an object is an instance of the class), the object will have the values for the attributes.
object cat:
1. no of legs - 4
2. has fur - yes
3. walks on # legs - 4
4. has claws - yes
5. has beak - no
Lalithadik:
Sorry but i want the answer for the attribute of class computer language like features, history etc.
Similar questions