0

Guys can anyone explain classes and objects to me ....in the simplest way possible with a C++ illustration please?

14th Feb 2017, 5:33 PM
Blessing Tayedzerwa
Blessing Tayedzerwa - avatar
3 odpowiedzi
+ 1
rohan can you please show me how to apply this in c++ cause when you say it like that I understand but when it comes to application of this in c++ language I get confused please
14th Feb 2017, 7:39 PM
Blessing Tayedzerwa
Blessing Tayedzerwa - avatar
+ 1
I would describe it as such: class - This is your blueprint. It gives you all the specifics of how to build. - ex.: You have the design for a house (your blueprint). The walls are all the same, the roof is made of a particular material, and even the pipes connect certain rooms. object - This is a unique instance of the build. It has the same structure of the class but the data contained within is unique to that object. - ex.: The blueprints are used to build a house for John and Sally. Their houses look the same but what makes it John's house is that it is full of John's personal items. These items collectively are specific to John's house.
15th Feb 2017, 3:50 PM
Garet Dade
Garet Dade - avatar
0
a student is a class and a specific students lets take a student named David is a object of class student
14th Feb 2017, 6:05 PM
Rohan Salvi
Rohan Salvi - avatar