Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 30th, 2007, 10:56 AM   #1
ryan79
Newbie
 
Join Date: May 2007
Posts: 1
Rep Power: 0 ryan79 is on a distinguished road
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!
ryan79 is offline   Reply With Quote
Old Jun 10th, 2007, 4:31 AM   #2
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4 mackenga is on a distinguished road
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?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC