0

Is someone available to teach me the classes and objects?

4th Sep 2017, 7:29 PM
Noush Rabah
Noush Rabah - avatar
6 ответов
+ 1
Classes are like blueprints. They contain the information needed to make an object. Here is a class: class player { public string name { get; set; } } Let's use it to make an object: player hero = new player(); hero.name = "Rikimaru"; "hero" is the object and "name" is the object's property. edit: sorry this is C#.
4th Sep 2017, 7:42 PM
Bagshot
Bagshot - avatar
+ 1
The technique can be used in all sorts of situations. Video games spring to mind. The player class can be re-used to make all the characters in a game. Obviously this is basic. A real player class would contain tons of properties. And that is why OOP is so important in big projects.
4th Sep 2017, 7:48 PM
Bagshot
Bagshot - avatar
+ 1
I wouldn't worry too much at the moment, it confused me as well. But once my knowledge and experience grew, it started to make sense. Keep on coding!
4th Sep 2017, 7:53 PM
Bagshot
Bagshot - avatar
+ 1
Student.
4th Sep 2017, 8:02 PM
Bagshot
Bagshot - avatar
0
uses for??
4th Sep 2017, 7:44 PM
Noush Rabah
Noush Rabah - avatar
0
r u student or teacher
4th Sep 2017, 7:55 PM
Noush Rabah
Noush Rabah - avatar