learn about beach gases and objects first of all this review the six of
classes an object real quick so well by in the class using a class cured
followed by the class name and inside the currently back this we have
properties and methods of the class so properties are just in other words for
variables and that's what we call properties is what we call variables
inside the class and methods is what we call functions and so the glass so
you can think of a class as just the collection of property these and
methods and that's all it is and if we wanted to access our property inside
the glass we would use a keyboard this followed by the object operating
an operator also known as a dark I'm just going to call(Dallas Website Development)
the radar from now and you do the same thing you for as if you wanted to access
the method names well now I would say to a glass as we actually instead she the object
using the new you're followed by our last name and at this point when we do
this the object of the class has been instantiated and that means the object
is going to inherit or basically obtain all the methods and properties of
that class so we can use the hard operator again earlier the object
operated to access all those properties and methods with the object so let's
move on and let's let me define a simple class called and again glass can
gained early brackets now inside the glass I'm going to find a bunch of
properties and just one method so, first of all, every game is going to have a
price every game going to have a name every get games going to have a photo
array covered picture and I'm also going to define the variable in directory or
the deer and I'm going to have specified to fold value were and this is a
you're acting area where all I gained pictures are going to be lucky had its
own at this point to have a valley class was just define on that to function
are not a function and method and this method is going to print game
information to the screen so right now at this point it doesn't really do
anything but let me just show you how to instead she at the objects so if i
had ~~~~~~~ had [UM] invariable and I said new gained at this point out the
game would become the game variable will become an object also gain class
a theme is the object typed game clouds and second starts said some of this
properties to the actual game so I can say something like gained object
the operator named he calls by a shark and since big game the are price equals
fourteen ninety-nine big gained dark photo equals and this is the jay bag
name of the photo which is inside that games [UM] or and so here I'm just
class for the actual objects so inside the print function I can now see and
this named occur this price and occurred this so to [SMACK] this directory
first and then for tough ok at this point let's see what happens here if i
called it method outside the class game dark crane game should out but some
information (Dallas Website Development) is so printed out all that information but lets me just define a
constant then you really defined called the are and it's just going to have
an again it now for the constants it's a little different we don't use that
this keyword and a dark object operator instead that we do this we do cells.

No comments:
Post a Comment