Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Binary/ASCII Counter with GUI
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
joe333




PostPosted: Fri Apr 16, 2004 2:59 pm   Post subject: Binary/ASCII Counter with GUI

I am lost. I have to use a GUI and make a program with procedures that will let the user select from a menu whether they want to see the binary counter, the ASCII Convertor or a Light Pattern. There also has to be 8 circles on the screen that blink as the program counts from 1 to 255 in binary. Any idea where I can begin?
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Fri Apr 16, 2004 3:48 pm   Post subject: (No subject)

First, make a binary counter, a ASCII converter, and a Light Pattern Program.

then, make the buttons for the GUI. When you say GUI, I'm assuming you have to use the GUI widget from Turing.

lastly, for flashing circles, just every time when the binary counter goes up, get a random color, and draw a circle of that color.
McKenzie




PostPosted: Sat Apr 17, 2004 1:24 pm   Post subject: (No subject)

Did you figure out your Dec -> Binary conversion from the other day or are you allowed to use strint for this one? You will need this for both the counter and the Light problems. The ASCII problem is easy all you have to do is use chr().
As AS says start by solving each of the small problems. Make each one a procedure, that will make the GUI part easy. For example the easy one will look something like:
code:

proc showASCII
     for i:1..255
          locate(10,10)
          put i:3, chr(i):3
          delay(100)
     end for
end showASCII
joe333




PostPosted: Sat Apr 17, 2004 8:20 pm   Post subject: (No subject)

so how would i turn the other binary covertor into a counter and then put it into a procedure? Do i use something similar to the code you put above? Could you give me an example for the binary counter?
Tony




PostPosted: Sat Apr 17, 2004 9:15 pm   Post subject: (No subject)

code:

for i:1..10
put intstr(i,8,2)
end for
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: