logo Sign In

Post #52153

Author
Skipper
Parent topic
Code Wars: Return of the java
Link to post in topic
https://originaltrilogy.com/post/id/52153/action/topic#52153
Date created
5-Jun-2004, 4:44 PM
I've heard it said that star wars junkies and forum folk may talk a lot about technical stuff, but when it comes down to it, they really don't know anything. Let's prove them wrong. Post some code and see if the other's can tell what it does *without* plugging it in and running it.

I'll start: anyone dare to take me on?

public boolean ****(String fileName)
{
resetDataBase();

TextInputFile f;
f = new TextInputFile (fileName);

while ( !f.eof() )
{
String localFirstName = f.readLine ();
String localLastName = f.readLine();
String localGender = f.readLine();
String localAnime = f.readLine();
String localPublisher = f.readLine();
f.readLine();

Character aSingleChar = new Character(localFirstName, localLastName,
localGender, localAnime, localPublisher);

insertSingleChar (aSingleChar);
}//End while

f.close ();

if (numChar > 0)
return true;

else
return false;
}// End ***** ()

edit:// there were spoilers...