NOT a 'do my homework post' - Just a 'any suggestions?'
Author |
Message |
xLockx
|
Posted: Wed Apr 13, 2005 5:15 pm Post subject: NOT a 'do my homework post' - Just a 'any suggestions?' |
|
|
Hey guys, I have been reading through the forums here - and have seen some pretty intresting things. I would just like to pose a couple of ideas or troubles I have incountered and if anyone has any suggestions on how to overcome them.
Just a bit about myself first - (Introduction of sorts). I wouldn't say that I have 'mastered' Turing (because of course that would imply I could anwser all problems - which I cannot) but I had alot of fun with it and know the majoirty of the language. I do relize however - the thought of 'once you know one language you know them all', this of course applys - sure I know what a loop is, or a variable, but of course Java and Turing are VERY different. So - this is my real first project with Java (Holt Softwares version) so - some of these questions may have a easy solution.
Let me be clear here this is not 'due for a project on friday' or anything like that - just someone trying to further his programming knowledge.
Ok - now that I have that out of the way, I will describe what I am attempting to do - and the problems I have not delt with yet.
Basically in a nut shell, I want to use Java to create presentation of sorts, beggining with a introduction 'page'. Simply having a large title, some background music and 3 'buttons' each having a different catagory, once pressed would open up a new console (and minimize the previous one) with information pertaning to an aspect of the presentation. There would then be a button that would be pressed for the next 'slide' of the topic which would clear the screen (over time?) and present more information with diagrams pictures (ect..). This would continue untill all slides have been read (creating a variable that increases by one, once the first section of slides have been pressed, and after all three have been viewed would then 'boot' the viewer from the program with a nice goodbye.)
The main question(s) I have would be;
- Is it possible to insert background music into the 'project'.
- How to make the transition / how to open a new console once the button is pressed?
- (I already know that there is tutorials on this site's forums, but other than those) Would anyone have any great 'newb' or 'new guy' tutorials to suggest that I could learn all of the answers to the above questions and more?
Thanks for taking the time for reading,
-'Lock' |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
wtd
|
Posted: Wed Apr 13, 2005 5:26 pm Post subject: (No subject) |
|
|
A few thoughts.
You'll wish to start with simple, text-based programs. Java is a different language, and more than just different syntax, there are different ideas behind it. This primarily deals with object-orientation, but aside from that, Java is just less procedural than Turing, and that's probably a bigger difference than you can imagine.
Java's idea of a "console" is different from Turing's. Turing has a "console", but this is a special purpose window with nonstandard behavior. Java uses the standard system console. Within this, you can't do things like outputting text at specific pixel coordinates.
For dealing with output other than pure text, you'll want to look into Swing, but that's not something you should immediately jump into.
Good luck.
P.S.: consider a lighter language to work on as a second language as you expand beyond Turing. |
|
|
|
|
 |
rizzix
|
Posted: Wed Apr 13, 2005 6:28 pm Post subject: (No subject) |
|
|
yes everything what wtd said.. and this:
Its not going to be so simple. Yes you are right there are similarities.. but there are also differences. The problem with Turing is that the standard library is NOT object oriented (OO). That will be your biggest problem: getting used to the new style and design.
In turing almost the entire library is procedural. In java, every bit of the standard library is OO.
it is necessary to first get comfortable with the languages it self.. and then program in it. |
|
|
|
|
 |
wtd
|
Posted: Wed Apr 13, 2005 6:35 pm Post subject: (No subject) |
|
|
Well, you do have to program in a language to become familiar with it...
But the key is that we can cheat. No one said the programs you write to become familiar with it have to start out complicated. Start out easy and build upon your knowledge with each program you attempt. |
|
|
|
|
 |
xLockx
|
Posted: Wed Apr 13, 2005 7:09 pm Post subject: (No subject) |
|
|
You know what guys - after reading what you put I decided to get on track - starting simple. I completely relized this is how I started turing.. Shamed to admit but yes I did the 'Hello world' for kicks
Anyway - I know as stated before thet Java and Turing are two very different languages, but is there such thing as an 'if' statement within Java. I'm reffering to the if in turing for example... (i'll use a bit of my Java code - the parts I dont understand for Java are in turing )
(Imported classes and consoles and such)
c.println ("Information goes here");
int count = 1;
while (count < 20)
{
c.println ("Very intresting information");count = count + 1;
c.getChar();
// The Get char and clear are a simple means of making the user press enter, and then clearing the page for MORE information to be displayed (not the same information obviously)
c.clear();
(Now Here is is where I am getting a dilema - where I would like to use an if.. )
//if count = 2 than
//say this information about this topic
//elsif count = 3 then
//say this OTHER information
}
c.println ("Click close");
I do relize this is most likely a bit hard to understand.. if you did - do you have any suggestions on how this could be done, and if not perhaps an explination why?
Thanks again,
-'Lock' |
|
|
|
|
 |
wtd
|
Posted: Wed Apr 13, 2005 7:18 pm Post subject: (No subject) |
|
|
Another suggestion: learn using the standard Java libraries, rather than those Holtsoft provides.
As for conditional statements...
code: | if (count == 2)
{
}
else if (count == 3)
{
}
else
{
} |
|
|
|
|
|
 |
|
|