OOP Starting Question

  • Thread starter Thread starter Ivan Weiss
  • Start date Start date
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
 
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
 
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
 
Back
Top