![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2007
Posts: 1
Rep Power: 0
![]() |
Newbie question - 1 or mult. class modules?
I'm trying to create a program in VB which will calculate various physical properties for a chemical stream.
I want to make it a function based call where the user can simply type in excel =ViscosityOfStream(highlight cells of the names of the components, highlight cells for the weight percents, temperature). I want to make this is as easy to understand as possible - and w/ that - easy for someone else to pick up where i leave off on this project. So to my question - Should i make 1 class module and make everything a subset of that, or would it make more sense to make multiple class modules based on the physical property. This get's confusing because some calculations will rely on what else is in the stream w/ it rather than just averaging based on the mole fractions or weight percents. As i read through this post, i'm afraid no one will understand what i'm talking about - BUT we'll give it a try anyhow. Thanks! |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
Well, I for one don't quite understand it! A class roughly corresponds to an entity of interest to your program. Although I'm not at all sure I understand properly what you are trying to achieve, it sounds like a chemical stream is an object of interest so I'd say a class representing one of those with various properties would be the most intuitive to future maintainers and anyone calling your code. So you might end up with:
=MyStream.Viscosity(...) ...in your Excel cell. I haven't actually worked with VBA but that's what I'd volunteer based on my knowledge of VB6.
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Newbie question, referencing method from another class | csrocker101 | C++ | 6 | Apr 9th, 2007 7:33 PM |
| Wierd compile Error. Need help please. | Keiyentai | Java | 7 | Aug 19th, 2006 1:35 AM |
| What is: "Oriented programming (OO)?" | BrinyCode | C++ | 12 | Nov 22nd, 2005 7:40 AM |
| User Input for Number Format | ericelysia1 | Java | 0 | Jul 21st, 2005 3:41 PM |
| static class members and libraries (linking question) | earl | C++ | 2 | Jun 22nd, 2005 5:21 PM |