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

OOP Starting Question

P: n/a
I have posted a similar question before but now want to officially begin
a new project correctly using OOP. I have created two classes, Customer
and Customers. I want Customers to have some form of a
variable/array/collection/etc. that contains as many customer objects as
I need to be using at that time.

For example when I populate a listing of all of the customers in the
database I figured there should be a variable that fills itself with all
of the customers, and than the customers class should contain methods to
return all of them to fill my list.

How should I do this? What datatype should I be using?

If anyone can suggest a good OOP book for visual basic that isnt too
generic I would love to buy it as a reference. I am not a programmer by
profession and am doign this for my company on my own time and consider
myself to be intermediate and find most books I can follow the samples
but am not able to grasp the concepts to do on my own.

Thanks in advance,

Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ivan,
Robin A. Reynolds-Haertle's book "OOP with Microsoft Visual Basic.NET and
Microsoft Visual C# .NET - Step by Step" from MS Press does a good intro to
the "how" of OOP in VB.NET, however it does not cover the "why" of OOP.

For a CustomerCollection class (Customers property) I would inherit from
either System.Collections.CollectionBase or
System.Collections.DictionaryBase depending on if I needed to get at a
Customer object by index (CollectionBase) or a unique id (Key)
(DictionaryBase).

Hope this helps
Jay

"Ivan Weiss" <iv*****@optonline.net> wrote in message
news:eR*************@TK2MSFTNGP12.phx.gbl...
I have posted a similar question before but now want to officially begin
a new project correctly using OOP. I have created two classes, Customer
and Customers. I want Customers to have some form of a
variable/array/collection/etc. that contains as many customer objects as
I need to be using at that time.

For example when I populate a listing of all of the customers in the
database I figured there should be a variable that fills itself with all
of the customers, and than the customers class should contain methods to
return all of them to fill my list.

How should I do this? What datatype should I be using?

If anyone can suggest a good OOP book for visual basic that isnt too
generic I would love to buy it as a reference. I am not a programmer by
profession and am doign this for my company on my own time and consider
myself to be intermediate and find most books I can follow the samples
but am not able to grasp the concepts to do on my own.

Thanks in advance,

Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

P: n/a
Hi
I like this book 'Visual Basic .Net Classes Design -
Coding Effective Classes' from Wrox. Is contains the
following chapters : Defining Types, Type Members,
Methods, Constructors and the Object Lifecycle,
Properties, Events and Delegates, Inheritance and
Polymorphism, Code Organizations and Metadata.

Kind Regards
Jorge
-----Original Message-----
I have posted a similar question before but now want to officially begina new project correctly using OOP. I have created two classes, Customerand Customers. I want Customers to have some form of a
variable/array/collection/etc. that contains as many customer objects asI need to be using at that time.

For example when I populate a listing of all of the customers in thedatabase I figured there should be a variable that fills itself with allof the customers, and than the customers class should contain methods toreturn all of them to fill my list.

How should I do this? What datatype should I be using?

If anyone can suggest a good OOP book for visual basic that isnt toogeneric I would love to buy it as a reference. I am not a programmer byprofession and am doign this for my company on my own time and considermyself to be intermediate and find most books I can follow the samplesbut am not able to grasp the concepts to do on my own.

Thanks in advance,

Ivan

*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.