Current location: Hot Scripts Forums » Programming Languages » C/C++ » Traffic Light Simulation


Traffic Light Simulation

Reply
  #1 (permalink)  
Old 03-13-04, 08:09 AM
mil_an mil_an is offline
New Member
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Traffic Light Simulation

Hi,

Can anyone help me with a console application that I have to build?

The console application should be in written in Visual C++, and it should simulate a simple traffic light. It should cycle thru the states:

Stop -> Prepare to Go,
Prepare to Go -> Go,
Go -> Prepare to Stop.

I have no experience writing code, so your help is much needed, and will be much appreciated....please help!!

Thanks...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-14-09, 04:23 AM
simulation11 simulation11 is offline
New Member
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
That's quite an interesting but difficult work. Im not much knowledgeable about writing code, too. So sorry I cant help u now.

simulation rachat credit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 05-15-09, 08:27 AM
mik489 mik489 is offline
New Member
 
Join Date: Apr 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Traffic Light Simulation

How little experience do you have exactly? Not trying to be mean, just trying to see how best I should explain this to you. If you already know some c++ you should be able to follow what I'm going to explain. Ask if there is something you dont get.

First, you even mentioned that you need to cycle through, that's step one. So you're going to need a loop. Basically (again assuming you know C++) you should create a loop statement (a 'while' statement would work nicely with some boundaries) and then just cout<<"stop"<<endl; cout<<"prepare to stop"<<endl; etc. This would loop through until you want it to stop.

Out of curiousity, what exactly is this for? An assignment for class or are you just teaching yourself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
looking to buy content site with high traffic tomcromp Job Offers & Assistance 0 02-27-04 05:26 PM
script on parsec for simulation maverick_2003 Script Requests 0 12-25-03 10:43 AM
Link Exchange with high traffic site kuvera Traffic Exchange 1 12-15-03 08:15 PM
ICESTORM.COM – Special 1gig space w/ 35gigs traffic! icestorm General Advertisements 0 11-03-03 08:09 PM
www.boogle.tk ....traffic exchnge fahad Traffic Exchange 0 10-23-03 09:52 AM


All times are GMT -5. The time now is 12:49 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.