Hi guys. I have just been handed my Java programming assignment and it is a doozie. I have to program a console application to import, manage and browse a library of plain text movie data imported from IMDB. And seeing as I have no idea what I am doing, I 'm bricking it. I am not asking anyone to do it for me, but I genuinely have no idea where to start. Can anyone recommend a very simple (and preferably free) java tutorial site with a gentle learning curve? If only to help me get a firmer grip on the basics. I would also really appreciate it if someone could help me debug my code. Thanks in advance,
I would look into Java 'Scrapers' if I'm understanding the task right. Then JDBC with a database to store the information. The program would work something like: Start || Scrape info from IMDB page from specified title (or however) || Store relevant information in a POJO/bunch of strings/integers || Create entry in database with a Unique Key (you can auto-generate) || Take the information you've just stored in a POJO/bunch of strings and populate this new entry || Create a simple console search function for the database, working on title. For extra marks you could expand that last bit to give an option to search by actor, returning any films with them in (currently in your database). Hopefully this is on the right track, but I'm probably not the best Java developer on these forums so some others might chime in with a better approach!
http://www.w3schools.com/jsref/default.asp http://www.javabeginner.com/ always a good start, also download Netbeans if you havnt already. Do steps listed above and you should be alright. Also not sure but you may need to use MS Access to create the DB so you can store the relevant information or just chuck it all in an array, either way its a fair bit of work and messing about.Last step would involve using Javaxswing to create popup boxes asking relevant details. Post your code once you have a crack at it and ill see if I can help. Done Java Programming (SQCF lvl6) last year at college, im still abit rusty when coding but usually can see any mistakes. Ill help if I can.
Thanks for the quick responses. I'll definatly take a good look at the links when I get back. Just sat through a 4 hour Java lab and despite a throbbing headache caused by one of the lab techs not knowing when to stop explaining stuff, I have managed to make a 'decent' start. hopefully by the end of the of today I will have a program that can create, populate and edit an array of movie data. But then I have to work out how to import a plain text file. This wouldn't be so difficult if I wasn't programming an artificial neural network with C++ in another class
ooh sounds like HNC Computing, I did think about taking that but opted for the easy route and went Interactive Media instead hehe. Came across http://www.java2s.com/Code/Java/File-Input-Output/Allowsreadingandwritingtoaplaintextfileviaalistoflines.htm I dunno if its any help but you can chop up bits of the code to get it to read your text file. Just remember your lecturer will know if its copied and pasted though, I got caught out when making one of my first programs (dice game - high/lo). Lecturer said that each person wrote code differently and there personality showed in it.
For the text file you need a simple file input stream. Define the root directory of the text files as a constant, then you can point to the relevant text file for the input reader. Doing it with PDF's is where it gets fun! (sarcasm) took me bloody ages to get that worked out. What's with the text files though? Are you using them instead of a database?