Be the first to post for 'Introducing Classes'!



If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.


2nd time through, i’m understanding classes more than before


Great news


What I actually need to learn (and I jump a loot of classes because of this) is enums (I never see enums before) but I will pass for classes too because… let’s say my c++ class paradigm isn’t really good


Without some sort of illustration, and if I was a beginner, I am pretty certain my brain would have exploded at this point.

I would hope that this means the BullCowGame class will be a kind of model and the console interaction will deal with the view and controller (hard to separate in console app, yes?).

I look forward to see how cohesion works this way.

[Begin pontification]
Accepting that the goal here is to race to use of the Unreal Engine, I think I would, in a leisurely course, get to enums and structs first, then show structs with methods as a method of encapsulation where now there are also interface contracts around it.

That is essentially how we got to C++ classes at the beginning of the move from C to C++, and it might be an useful way to understand what the C++ class mechanism is.

It just occurred to me that the mathematical classes are collections of instances. That is, a mathematical class is a collection the members of which satisfy some common quality. The C++ class declaration is basically a computational template for instances all on that pattern – the common quality.

I look forward to the development of a BullCowGame class.
[end pontification]



Can Someone please explain to me what classes are? i have searched the internet and none of the explanations i found about classes make any sense…


I’m sorry if my grammar is not correct because my English is not my primary language.

The “class” is like a class in school. You can imagine that if you know the name of a student in “class A”. But “class B” also has the same name of that student you know. So how do you distinguish? You need to say that and he is studying at “class A”. So the other people will know that student who you are talking about.
The class in C++ (other languages programming too) works almost same above. The class is a group of functions and variables. So why you need to create a class? Because if you understand the class, your code will more simple and readable.


I am enjoying the course more and more each time. So far everything has been easy to understand and not just because the lectures but because if I don’t get something, usually someone else doesn’t get it either and is asked and answered in the discussions. Hope everyone is having a good day.


To be honest, the details are still a bit chaotic in my mind, and somewhat even vague… However, the classes essence lies in the ability to form reusable, yet classified (categorized) code at the same time; instead of building “limited” programs to function in a certain manner and only for that specific time before need! Hence, I believe that classes along with their methods can help create code-engines that can be imported into a multitude of project and still always be critically useful!

It may seem a bit daunting at first, not only to understand this programming technique, but also to get used to it on the long run… Still, one thing is for sure, it is absolutely useful and of the utmost necessity. Sooner rather than later, per say!


Some public class ideas:


I am finding classes a little difficult to understand. Mainly because I am trying not to confuse classes from CSS, Javascript, and now C++ into one big mess in my head.

I think I understand the concept. We create a class so when creating multiple instances that would have the same information, we don’t have to retype everything?

Also how do you know what you should place in private vs public?

In the Bulls and Cows game, I see the 2 we currently have for the part I am on Private appears to be storing information, where as the segments in public are things we can use to call on the information in private?


Public is for stuff that we don’t mind other classes seeing about us.

Private is a way to protect the implementation details.

The more general programming concept here is called Encapsulation.


You can think of classes as of some “blueprints” (here I mean not the Unreal BPs) like Plans for a building or a technical thing you would build.
So the class is the plan, and the instance, which is made with help of the class, would be the building or the technical thing itself.