By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,978 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,978 IT Pros & Developers. It's quick & easy.

Need help understanding OOPs terminology

P: n/a
Hey guys, need some help understanding some things that maybe someone can
explain or clarify it a little better then a text book. Here is my
understanding so far:

Class - basically a shell for your code

Fields - basically just a variable but can be "write protected"

Properties - access fields, they can retrieve data contained in the
"variable"

Methods - Used for calculations, or can retrieve data from objects such as
combo boxes and text
fields, methods can also start sub procedures or another set of
instructions.

Constructors - special method that runs that runs and can assign a new value
to fields

Am I close on any of these?? Thanks guys!!

Mike
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mike" <mi**@work.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You're close on all of them, I've just redone it for you emphasizing the
similarities between the various components.

Class - A "template" for objects. Best analogy for this: the class is the
cookie cutter and the objects are the cookies.
Members - Something defined on a class. Basically these make up the "shape"
of the cookie cutter. All members have a visibility (public, private, etc)
Field - A type of member that is a variable with class scope. Fields can be
readonly, which means they can only be set at object creation.
Method - A type of member that contains executable code. They can be divided
into two main types: functions (which return values) and procedures (which
do not).
Property - A type of member that has similar usage semantics as fields do.
Unlike fields, properties do not allow direct access to the underlying
variable, but control access to it through one or both of two special case
methods: the get and set accessors. The get accessor is a function, and the
set accessor is a procedure.
Constructor - A type of member that is effectively a method. It is used to
construct the object. It is the only method that can modify readonly fields.
Jul 21 '05 #2

P: n/a
Thanks Sean that helps!

I found a pretty good (a little surprised) white paper on creating classes
in VB.NET.

It took 7 pages to describe what and how to use classes whereas the book I
have only took 4!

Thanks again!!

Mike
"Sean Hederman" <em*******@codingsanity.blogspot.com> wrote in message
news:d4**********@ctb-nnrp2.saix.net...
"Mike" <mi**@work.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You're close on all of them, I've just redone it for you emphasizing the
similarities between the various components.

Class - A "template" for objects. Best analogy for this: the class is the
cookie cutter and the objects are the cookies.
Members - Something defined on a class. Basically these make up the
"shape" of the cookie cutter. All members have a visibility (public,
private, etc)
Field - A type of member that is a variable with class scope. Fields can
be readonly, which means they can only be set at object creation.
Method - A type of member that contains executable code. They can be
divided into two main types: functions (which return values) and
procedures (which do not).
Property - A type of member that has similar usage semantics as fields do.
Unlike fields, properties do not allow direct access to the underlying
variable, but control access to it through one or both of two special case
methods: the get and set accessors. The get accessor is a function, and
the set accessor is a procedure.
Constructor - A type of member that is effectively a method. It is used to
construct the object. It is the only method that can modify readonly
fields.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.