Object Identity: Entity and Attributes In OOAD In Hindi

Object Identity (Vastu Ki Pahchaan): Object-oriented programming me, har ek object apni alag pahchaan ya identity rakhta hai. Yeh identity object ko doosre objects se alag banata hai, chahe unmein kuch bhi samanata ho. Object identity, object ke unique existence ko prakat karta hai. Dusre shabdon mein, object identity object ke alag hona ka ek tarika hota hai.

Entity (Vastu): Entity ek real-world concept ya object hota hai jo hum software me represent karna chahte hain. Is concept ko ek class mein transform kiya jata hai jo attributes aur methods ko define karta hai. Har entity class ke ek instance ya object ke roop mein exist karta hai. For example, agar hum ek “Student” entity ko represent kar rahe hain, to har ek “Student” object ek specific student ki details jaise ki naam, roll number, aur marks ko store karega.

Attributes (Gun): Attributes entity ke characteristics ya properties hote hain jo use describe karte hain. Har entity ke alag-alag attributes hote hain jinme data jaise ki strings, numbers, ya dates store kiye ja sakte hain. Attributes object ke state ko define karte hain. Jaise ki “Student” entity ke attributes ho sakte hain – “name” (naam), “roll number” (roll number), aur “marks” (ankit).

Jab hum ek entity ko class ke roop mein define karte hain, to us class ke har ek instance (object) ko alag-alag attributes aur uski unique identity hoti hai. Object identity ek object ko doosre objects se alag banata hai, chahe usmein saman attributes kyun na ho. Isi tarah, entity ke attributes uske gun hote hain jo uske mahatva aur prakriti ko darshate hain.

Samanya roop se, object identity ek unique identifier (jaise ki memory address ya unique ID) ke roop mein hota hai, jisse system object ko pehchanta hai, jabki attributes us object ki sthiti aur gun ko darshate hain. Is prakar, entity aur attributes mil kar ek object ki pahchaan aur visheshta ko prakat karte hain.

Leave a Comment