Account

 Option Explicit Private mvarAccountEntryCollection As Collection Private mvarObserverCollection As Collection Private mvaraccountName As String Public Property Let accountName(ByVal vData As String) mvaraccountName = vData End Property Public Property Get accountName() As String accountName = mvaraccountName End Property Public Function getEntries() As Collection Set getEntries = mvarAccountEntryCollection End Function Public Sub addEntry(entryDate As Date, amount As Currency) Dim entry As New accountEntry entry.amount = amount entry.entryDate = entryDate Call mvarAccountEntryCollection.Add(entry) End Sub Public Sub notify() Dim observer As AccountObserver For Each observer In mvarObserverCollection Call observer.update(Me) Next End ...

Get Joy of Patterns: Using Patterns for Enterprise Development, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.