+ 2
[CLOSED] What are the uses for classes?
6 ответов
+ 2
For an explaining of a concret vision, I like to think in the concept of class as the nature of a thing, animal, person ...
A class in C++ is a declaration of a new type of data created by us (the users) or by others. And, in a concret vision, that type is the nature of that thing, person, ..., in other words, an OBJECT. The class allows us our expression of what objects of that nature are, how it take action, and what are their characteristics. So, a class only describes how are objects of a unique nature, and it is the base for the correct functioning of our objects, and it simplifies the programming and the correct functionality of a our C++ programs. Also Our reasoning for programming will be better when we understand how to program object-oriented, in especial when the application we are developing is a complex application.
+ 5
They are used for creating your own datatypes inside of them
+ 2
Class acts as a container for your variables, methods, properties etc.
Imagine the scenario without classes. How will objects respond? How will they access a method? There has to be something that keeps them together.
+ 1
One use is to model part of the real world.
+ 1
Java is an oop language so class is most important thing since it helps us to create object.
0
Kyle, yeas bat Lon dik he bon.