I am still in the very beginnings oflearning java- and a friend asked me to write her a numerology program- when she types in a name, a number is returned - displaying the name's numerology. It ignores all keys except for characters. And each character stands for a number (A = 1, B = 2 , C = c...) and so on, until 9 is reached, then starts all over again with 1.
So for example, the name LEE would be (L = 3, E = 5, E = 5) so: 3 + 5 + 5 = 13 13 = 1 + 3 = 4
Thus, the name Lee has numerology number of 4 !
Anyway, the person I am making this for know virtually nothing about computers so I was wondering, is there any possible way to make this program into a graphical interface so she doesn't have to go through dos, find the directory and type in the commands at the dos prompt?
If not, do you know of any possible ways to make this more simple for her?
Also, is there any code in java to clear the screen?
Thank you so much. btw- here is my code, let me know if you see anything standing out that is terribly wrong with it- I knowit may not be very efficient and probably a zillion ways better to code it, but I know it runs
Madysen, sure you can turn this into a gui or even better an applet. However it would require some work. If you are going for the most user-friendly app possible, then you should use textfeilds in your gui/applet. If it was me, I would write an applet and put it on a free webpage host like yahoo-geocities, that way your freind could accses it from any computer with the internet and you wouldn't have to send her any files. Also, you were right about your code being sloppy- not to insult you or anything, but it is a lot more complicated than it needs to be. If you dont already know, java.sun.com is very useful. Sorry if I just confused you more-Dan
Joined: Feb 03, 2004
Thank you Dan
That is great to hear- that i could put it up on a web space, since I do have web space through my dsl.
I took java like 7 years ago, the first 2 classes... then this last semester jumped into Data Structures class (I have NO idea how I got through it- even my teacher was amazed since I started the class 2.5 weeks late and had to play catch-up from 7 years before)... so not only is my java extrememly out of date- I never really had a good foundation of it.. so little by little I have been teaching myself with little programs like these with trial and error.. hopefully one of these days I become more efficient.
Now, for putting it up on a web space, would I have to install java on the web space? The JDk that I downloaded from SUN?
If it is too complicated- where could I go for information on being able to put my program on a webspace (after it is written as an applet)?
Thank you very much.. and don't worry I never saw what you said as an insult.. i have a thirst to learn and know one day I will have this all mastered- and then look back like wow, I've come a long way.
Joined: Feb 03, 2004
Oh, one other question.. I thought I needed a database to put anything up on the web that is interactive?
This would be able to be put on the web and be interactive and anyone could still use it that has the url?
Something to play around with - needs testing and error handling
Joined: Jun 21, 2004
Madysen, you should not have to install java on your web space, the person who is viewing it will have to have a jvm on thier computer, althogh most browsers have a jvm built into them. So that should not be a problem. All you need to do is write the program as an applet and uplaod the class to your webspace, then write a html like this:
HelloWorldApplet.class being your class file.
Michael has provided some good code to get you started with a textfeild and button. If you are interested in applets (i think you are ) take a look at thishere. (btw this is from java.sun.com) Also java ranch has a forum for applets here. good luck and have fun -dan
Joined: Jun 21, 2004
Here is a good example of a simple applet (but not as simple as possible, yes it can get simpler) that has both an input and an output textfield.
You can run this from the command line, in appletviewer and from an html page. It requires j2se 1.4 or later. So if you put it up on the web it will only run if the java plug–in (1.4 or later) is installed and enabled for the viewing browser.