+ 1

What is object and say hello ?

From OOP

17th Aug 2019, 1:32 PM
Vedh Prakash
Vedh Prakash - avatar
2 ответов
+ 2
To create an object you start with making a class from this class you can use it like a cookie cutter to create lots of cookies( these are the objects) they all look exactly the same but each one is seprate from one another 🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪🍪 You could even extend that class override a few of its methods and make lots of dounats 🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩🍩 im getting hungry now ☺️
17th Aug 2019, 2:44 PM
D_Stark
D_Stark - avatar
+ 2
Object is a thing that consists of 3 different things: Identity Attributes Behaviour Attribute is just something, that an object can have. You can have a jacket, the jacket can have red color. In programming world, attribute is just a variable that belongs to an object. Identity is little similar to attribute, but not 2 objects can have the same identity. It is basically a way to a reference to an object. Sometimes you can say "The guy with the red jacket.", but there can be another "guy with a red jacket". In programming world identity is a way to reference to the object. Behaviour tells what the object does. An object could walk, run, climb and eat, those are all behaviours of the object. Different objects can have different ways to do same things, like dogs and cats might walk by different ways. In programming world behaviour is a function, that belongs to an object.
17th Aug 2019, 4:05 PM
Seb TheS
Seb TheS - avatar