473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Need help understanding OOPs terminology

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
2 1815
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Chris Reedy | last post by:
For everyone - Apologies for the length of this message. If you don't want to look at the long example, you can skip to the end of the message. And for the Python gurus among you, if you can...
15
by: Roy Smith | last post by:
I understand that "delete xp" deletes a scalar object and "delete xp" deletes an array of objects, but what I don't understand is why you need to tell the compiler which you're doing. When you...
3
by: Newbie | last post by:
I am extremely new to the working of XML. Our client wants us to access their Website. They also want us to retrieve XML (files?) from their site. We will then somehow import it into our SQL...
2
by: O.R.Senthil Kumaran | last post by:
Hi list: Following is a piece of code: main(int argc, char** argv) { int rc, result; struct passwd *uidpwent; /* init resources */
0
by: Tiga | last post by:
Right off I know nothing about programming so any help will be useful. We have an application that I have manipulated by creating an IF statement which is below. ...
2
by: Mike | last post by:
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...
1
by: Learner | last post by:
Hi there, I have designed a three tier arichitecture(presentation, business and datalayer). I have used Shared keyword in all my DL methods inorder to make them available in my BL. I have...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
15
by: silverburgh.meryl | last post by:
Hi, I am trying to understand the following line: # a is an integer array max(), (j,i)) Can you please tell me what that means, I think sum(a means find the some from a to a But what is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.