Computer Science, asked by princesssaima5572, 1 year ago

Define and explain an attribute.

Answers

Answered by nain31
3
 \huge \boxed{ \boxed{ \mathcal{ATTRIBUTES}}}

 \textit{Attribute \: is \: the \: content\: that \: makes \: an} \textit{ \: object \: differ\: from\: other \:object}

A class have certain characteristics and behavior which are due to data members or attributes and the member methods in programming software.

Each object of a class have its own attributes and method function within a class. The object distinct due to attributes but the function are carred normally to deal the attributes of each object.

As in normal life take example of pens,

The pen is the class and object are its Gel and ball .Their attributes that makes it different are its colour either its blue, black or red .And the other attribute can be its price that varies.
Similar questions