View Full Version : My java class
Zero Tolerance
03-12-2004, 03:54 AM
Just thought that I would post my latest homework assignment from my java programming class.
I am still very much a noob to programming...but I am finding java very exciting.
This is a simple program we had to do to convert celcius to fahrenheit and vice versa.
http://thebluefields.com/jbjava/chapter6/SixTwoThree.html
You can view the source by clicking below the screenie.
Be nice....I know I am still very green!
sssssssssBANG!
I like it. Brings back some good memories.
Is this your code or the professor's?
Anaconda
03-12-2004, 11:19 AM
Looks good, the only thing I would add is some formatting control.
Entering -50 C will result in -45.55555555555556 F
Due to the size of the box you will initally see only the tail end ''55555556"
Zero Tolerance
03-12-2004, 11:31 AM
Bond...yes...this is my code. The only thing given in the EOC problem was this fragment
if (actionEven.getSource() == input1 ) {
// process input1 interaction here
}
else ( // e.getSource() == input2
// process input2 interaction here
}
The rest is on my own accord
Anaconda...thanks for the suggestion. I never really tested too many temps...so I wasnt thinking of the sig digits being too large for the display
thanks!
java is fun!....but I really hate Sun ONE studio simply because of the resource hog it seems to be!
Zero Tolerance
03-13-2004, 02:22 PM
I just finished another assignment for this class.
This one was quite simple since Doc wrote the code and all we had to do was revise his code to do something a tad different.
This app is a multiplication tutor using Math.random to produce 2 numbers 0 thru 9 to multiply. His original code gave 1 response for correct answers and 1 response for incorrect answers.
We were to revise the code using a switch statement and case/break as well as Math.random to let the app give 4 random repsonses each to incorrect and correct answers.
Was very simple...but I still thought I would share since the forums have been a lil dead the last lil while
http://thebluefields.com/jbjava/chapter6/SixThreeTwo.html
sssssssssssBANG!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.