Click to See Complete Forum and Search --> : Java assignment!!
martin5kh
07-02-2001, 01:14 AM
I'm a new java programmer. I have an assignement due next week, but i really don't know how to do it! Can anyone give me some clue?
The question is here: http://www.csd.uwo.ca/courses/CS027b/assignments/index.html
namgor
07-02-2001, 03:41 PM
hm... so Western have CS programs???
------------------
DHAHL3seasons GP:73 G:121 A:55 Pts:176 GWG:12 +/-:184
UWSWA1season GP:9 G:12 A:8 Pts:20 GWG:3 +/-:-3
uwcdc.com (http://www.uwcdc.com) or namgor.com (http://www.namgor.com)
martin5kh
07-02-2001, 03:53 PM
YES!! So can you help me out?
Originally posted by namgor:
hm... so Western have CS programs???
------------------
CPU: Intel PIII-800 @ 930,
Motherboard: Asus CUSL2-C,
RAM: Mushkin 2 x 128MB Cas2 v3.0,
Hard Drive: 2 x 30GB ATA/100 7200rpm,
DVD: Pioneer 16x Slot IDE,
CDRW: Yamaha 8x8x24 CD-Rewriter IDE,
Video Card: Asus Geforce2 GTS 32MB DDR Pure,
TV Card: ATI TV Wonder,
Sound Card: SoundBlaster Live! Platinum 5.1,
Networking: 2 x Linksys 10/100Mbps Ethernet Adapters,
Fan: Thermaltake Golden Orb FC-PGA,
Case: ATX Mid Tower 9301K 300W,
Keyboard: Microsoft Internet Keyboard Pro,
Mouse: Microsoft Intellieye Optical,
Monitor: Sony 19" E400 Trinitron,
Speaker: SoundWorks DeskTop Theater 5.1 DTT3500 Digital,
OS: Microsoft Windows ME and 2000 Pro.,
Others: Promise ATA-100 Controller Card and 2 Extra Fans,
Plus, an Asus M8300 Laptop with PIII-600, 192MB RAM, 12GB HD...
-----------------------
This is just as fast as bullet! Haha...
namgor
07-02-2001, 06:53 PM
alright, better stay away from Western! http://www.sharkyforums.com/ubb/smile.gif
Hints: ask your friends , not us !
------------------
DHAHL3seasons GP:73 G:121 A:55 Pts:176 GWG:12 +/-:184
UWSWA1season GP:9 G:12 A:8 Pts:20 GWG:3 +/-:-3
uwcdc.com (http://www.uwcdc.com) or namgor.com (http://www.namgor.com)
Here's a hint: read your textbook. I don't know Java, but here's basically what I'd do in C++:
(1) Make a BagOfScrabbleTiles
I guess this would be my main class. It's constructor would initialize how many of each piece it is supposed to have. Oh yeah, each piece might be a structure or another class.
(2) Print the bag (use the toString method that you have written.)
Not sure what method you were supposed to have written, but I'm guessing that the letter and its value are two members of each tile object, and toString changes it to a string like the ones they have (eg, "[A_1]").
(3) Take a tile from this bag (using an inherited method.)
Ok, I guess I should read the instructions to find out what is inheritting what...no! That's YOUR job http://www.sharkyforums.com/ubb/smile.gif I'll let you handle that one.
(4) 'Print' this tile (using the toString method of the ScrabbleTile class)
I'm guessing print just prints the string that I mentioned above. Print just creates a string using toString, and then displays it with whatever IO Java has.
(5) Take another 74 tiles from the bag (don't do anything with them.)
Just take one tile 74 times in a loop, I'm guessing.
(6) Print the bag again (use the toString method that you have written.)
Just another loop, except you print tiles instead of taking them off of the pile.
Now that wasn't that hard, was it? http://www.sharkyforums.com/ubb/smile.gif
Here's a hint: read your textbook. I don't know Java, but here's basically what I'd do in C++:
(1) Make a BagOfScrabbleTiles
I guess this would be my main class. It's constructor would initialize how many of each piece it is supposed to have. Oh yeah, each piece might be a structure or another class.
(2) Print the bag (use the toString method that you have written.)
Not sure what method you were supposed to have written, but I'm guessing that the letter and its value are two members of each tile object, and toString changes it to a string like the ones they have (eg, "[A_1]").
(3) Take a tile from this bag (using an inherited method.)
Ok, I guess I should read the instructions to find out what is inheritting what...no! That's YOUR job http://www.sharkyforums.com/ubb/smile.gif I'll let you handle that one.
(4) 'Print' this tile (using the toString method of the ScrabbleTile class)
I'm guessing print just prints the string that I mentioned above. Print just creates a string using toString, and then displays it with whatever IO Java has.
(5) Take another 74 tiles from the bag (don't do anything with them.)
Just take one tile 74 times in a loop, I'm guessing.
(6) Print the bag again (use the toString method that you have written.)
Just another loop, except you print tiles instead of taking them off of the pile.
Now that wasn't that hard, was it? http://www.sharkyforums.com/ubb/smile.gif
alienrash
07-02-2001, 11:06 PM
Originaly due today, now wednesday. Been parting too much have we now!
------------------
Blueskies Blackdeath
Wow, how'd that get printed twice, with over half-an-hour in between? And considering that I went to bed at 10:30 http://www.sharkyforums.com/ubb/smile.gif
alienrash
07-03-2001, 01:23 PM
Gremlin!
Originally posted by Zoma:
Wow, how'd that get printed twice, with over half-an-hour in between? And considering that I went to bed at 10:30 http://www.sharkyforums.com/ubb/smile.gif
------------------
Blueskies Blackdeath