OOP Starting Question

I

Ivan Weiss

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
 
J

Jay B. Harlow [MVP - Outlook]

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
 
J

Jorge

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Proper OOP Use 6
OOP Design Question 7
OOP "Collection" of Objects 2
OOP vb.net 7
Fundamental OOP inheritance question 4
OOP / 3-Tier development questions 5
VB 2005 OOP Videos 2
OOP question 5

Top