If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > Need Help Structuring Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-11, 22:24
MatthewM MatthewM is offline
Registered User
 
Join Date: Mar 2007
Posts: 15
Need Help Structuring Code

Hey guys,

I've just started out with VB and I am running through a fun project to teach it to myself. I have a question in reards to the correct or best way to structure code.

Lets say we are interested in simulating a car. I want to model the process of starting the car and moving some distance. I have two choices:

Do i model the cars movement in one block of code that treats the car as a single entity and use classes to define one object?

OR

Do I uses classes to define each compnent of the car such as left tire, engine...etc.


i want to be able to create new cars easily, and to be able to use different tires, brakes, engines etc. Eventually be able to race 20 odd cars simultaniously. I also want damage and condition to be assigned to various parts of the car making it perform differently.

Has anyone got any advice or another approach?

Last edited by MatthewM; 04-12-11 at 22:31.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On