+ 3
What is the difference between class and structure?? And applications of the class..
2 odpowiedzi
+ 5
struct is all public
class has private members that have to be changed via public mutators
classes are used to represent Objects, everyday things. people cars animals utilities. etc.
classes can contain objects of other classes inside of them this is called aggregation. classes can be a "version" of another class, this called inheritance. there is millions of things to do with classes. the possibilities are endless.
0
Classes are the data structures where the combination of data and it's associated functions takes place. Uses of classes varies from user to user and hence is known as user defined data type. It contains the information necessary to create objects. It is almost an object oriented structure.
The logical or the mathematical model of a particular organisation of data is data structure. It has different operations - traversing, searching, inserting, deleting, sorting and combining records.