It's not a secret anymore!
The moose likes Beginning Java and the fly likes HELP with Project! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HELP with Project!" Watch "HELP with Project!" New topic

HELP with Project!

Philip Herzer

Joined: Oct 21, 2003
Posts: 21
Hello everyone, I am new to these forums. Coming from a python coding background. Well, right now I am taking a medical terminology class, and I thought that it would be nice to write a program that would help me prepare for the upcomming tests. Plus it would be a nice way to save trees!
My question arises from the dilema as to how to store many terms and their corresponding definitions. I assume it would be impratical to write variables for each term and defintion. Anybody have any suggestions how I can easily store and retrieve these values?
One Idea I have though was using a .xml to store the data, for example:

As you can see above, i could use Xerces package to parse the data in <term> and <def> tags and halve them stored in variable Strings. Than, all I have to do is write classes that would randomy output the definitions along with the correct definition into selections A,B,C, and D.
I'd appreciate any suggestions on what you people think is an easy way to go about tackling this task.

[ edited to break apart long lines in code block -ds ]
[ November 15, 2003: Message edited by: Dirk Schreckmann ]

"Mejor morir de pie que vivir toda la vida arrodillas."<br /> Emilio Zapata
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
I think you could create a reasonable solution with xml, or with a database, or even with just some simple text file i/o. I think any of these strategies would be better than hard-coding the values.
If you've any more specific technical questions on using XML, then let me suggest you mosey on over to the XML forum and ask away. And of course, general Java database issues should likely be discussed over in the JDBC forum.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: HELP with Project!
It's not a secret anymore!