Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,462 of 10,840    |
|    Iain Bishop to All    |
|    Object Model Problem    |
|    02 May 05 23:30:25    |
      From: iebishop@yahoo.co.uk              I'm trying to model objects for the following problem:              A building site contains assemblies, each of which can contain other       assemblies and/or materials.              I have modelled this using a Site class, Assembly class, and Material class       as follows...              Site Class (clsSite):       Option Explicit       'General Details       Public ProjectNumber As String       Public SiteWBSCode As String       Public SiteType As String       Public LastUpdateFirstName As String       Public LastUpdateSurname As String       Public LastUpdateDate As Date       Public TotalPriceOfAllMaterials As Double       Public GeneralNotes As String       'Contents of Site       Public SiteAssemblies As clsAssemblies 'a collection class of clsAssembly       Public SiteMaterials As clsMaterials 'a collection class of clsMaterial              Assembly Class (clsAssembly):       Option Explicit       'General Details       Public ID As Long       Public QuantityRequested As Integer       Public QuantityIssued As Integer       'Contents       Public AssemblyAssemblies As clsAssemblies 'a collection class of       clsAssembly       Public AssemblyMaterials As clsMaterials 'a collection class of clsMaterial              Material Class (clsMaterial)       Option Explicit       'General Details       Public InventoryCode As String       Public Rate As Double       Public QuantityRequested As Integer       Public QuantityIssued As Integer       Public TotalPrice As Double       Public DateAmended As Date              My questions are:       1. Have I modelled the problem correctly?       2. There is the potential for an infinite hierarchy of Assemblies - is this       ok?       3. If so, I am having problems imagining how I would iterate through say all       the materials to update their 'Rate' for example.       4. I'm also having problems imagining how I would go and find a material if       its 'Quantity Requested' has changed, given that it could be any number of       levels down.              I've spent hours without making much progress. Please help if you know the       answer to any of these questions.              Many Thanks       Iain              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca