|
URLList
Jan 12, 2002 16:40:12 GMT -5
Post by Sylph on Jan 12, 2002 16:40:12 GMT -5
is reading from a file considered input?
|
|
|
URLList
Jan 12, 2002 21:18:02 GMT -5
Post by CooLiBoP on Jan 12, 2002 21:18:02 GMT -5
I would think so...
|
|
|
URLList
Jan 12, 2002 22:36:48 GMT -5
Post by 1.8T on Jan 12, 2002 22:36:48 GMT -5
i think wut they want is like what we did for the battleship assignment in csc108, we just write an I/O class., then return everything,. ..
|
|
|
URLList
Jan 14, 2002 20:35:44 GMT -5
Post by Sylph on Jan 14, 2002 20:35:44 GMT -5
are importing java.io.* and putting throws IOException in the header of a method in URLList considered input or output statements? it won't compile, cuz it says the exception must be caught in the URLList class..
|
|
|
URLList
Jan 14, 2002 21:50:22 GMT -5
Post by 1.8T on Jan 14, 2002 21:50:22 GMT -5
are importing java.io.* and putting throws IOException in the header of a method in URLList considered input or output statements? it won't compile, cuz it says the exception must be caught in the URLList class.. i don't think it is. cuz in our battleship assignment in 108, that's wut i did., but then i never got it back to see wut i lost 1 mark on,.., . .,., my guess would be no its not considered input or output statements
|
|
|
URLList
Jan 16, 2002 16:53:21 GMT -5
Post by Sylph on Jan 16, 2002 16:53:21 GMT -5
yeah; i think i did that for my battleship game as well. but i also lost 1 mark for something...
|
|
|
URLList
Jan 17, 2002 15:33:35 GMT -5
Post by EurasianVixen on Jan 17, 2002 15:33:35 GMT -5
Does anyone know if both the title AND the URL should be put together in one element of the arrayList/Vector or if the URL goes in one element, and the title follows in the next element?
|
|
Polska
Full Member
"Let the blood of our enemies stain the battlefield" - Polska
Posts: 42
|
URLList
Jan 18, 2002 11:39:04 GMT -5
Post by Polska on Jan 18, 2002 11:39:04 GMT -5
I think its fien to have 2 vectors for example, 1 to hold the url and one to hold teh description. They dont mention a restriction on hte number you use. Whatever works ;D
|
|
|
URLList
Jan 18, 2002 22:45:07 GMT -5
Post by Observer on Jan 18, 2002 22:45:07 GMT -5
I'm not sure about the URL/title thing either. On the handout it says for the add command:
Read a URL and a title, and add the pair to the end of URLList
Since the class is called URLList I suppose that means that it doesn't matter if we use two different vectors as long as they are just added to the end of URLList.
|
|
|
URLList
Jan 19, 2002 2:28:19 GMT -5
Post by 1.8T on Jan 19, 2002 2:28:19 GMT -5
ummm., question.,., duno if i'm even doing this right.,.,
for getting each line from a html file did u guys do a search for a URL by going through the line to see if it starts with <a href.., and ends with > ??
if so, wut if the URL is long enough that it extends to the next line??. how do u tell it to goto next line to see where the url ends?
edit:Forget about this post cuz i'm an idiot., DO NOT TURN ON WORD WRAP in NOTEPAD@!
|
|
|
URLList
Jan 19, 2002 21:47:50 GMT -5
Post by CooLiBoP on Jan 19, 2002 21:47:50 GMT -5
I'm not sure about the URL/title thing either. On the handout it says for the add command: Read a URL and a title, and add the pair to the end of URLListSince the class is called URLList I suppose that means that it doesn't matter if we use two different vectors as long as they are just added to the end of URLList. I just added both the titles and urls to the end of my arrayList...I just have to remember that they are in the order url,title,url,title etc...
|
|
|
URLList
Jan 19, 2002 22:46:52 GMT -5
Post by Sylph on Jan 19, 2002 22:46:52 GMT -5
is it okay to have repeat items in URLList?
|
|
|
URLList
Jan 20, 2002 1:52:01 GMT -5
Post by Observer on Jan 20, 2002 1:52:01 GMT -5
Why do you think it wouldn't be okay? Though I doubt they'd give us repeats.
|
|
|
URLList
Jan 20, 2002 10:47:28 GMT -5
Post by Sylph on Jan 20, 2002 10:47:28 GMT -5
so when using search or lookup, when looking for a match, it's ok to print the same exact thing twice?
|
|
|
URLList
Jan 20, 2002 13:51:55 GMT -5
Post by EurasianVixen on Jan 20, 2002 13:51:55 GMT -5
Yeah, I have my list like url,title,url,title... But I asked the prof about that and he said that it would be more efficient and easier to understand if you put the pair into one element. The only problem is that when you need to list the elements, you have to somehow split the url and title from the element and print it out one after the other. How do you suppose you do that?!
|
|