Assignment 2
Assignment 2
Sectlon-A
(Short Anwer '1ypu (yientlona
1.) Defne: (a) Attribute (h) Behavlonr (e) Method.
Ans. Attribute. An attribute is n lutn value held by the objeels in n clans, It can be the strueture, nume,
size and other characteristies of an object. tg, nme, uge, belght anl weight ure the ttilutes ot
he objects of the class person,
Behaviour. lt is an action that an objeet performs.
Method. A specitic implementation of an operution by a certain cluss is called nnetlwd.
Class is declared using the keyword 'class. .Object is creuted througlhthe keyword "new.
behavlour?
4. How object model an entity and its
can an