Need help with Java Programming assignments!!

J

JFizzR

I need a number of things here to catch up with my java programming
class, and I turn to you guys, the experts, for help...

Does anyone happen to have a program that will turn a string of
characters based on ASCII to binary, and back again? (using 2-16 for
the binary...)
Second I'm looking for some help on a program witch isn't an applet,
yet an application that will ask for input of Hit, Stand, Draw for a
game of blackjack i.e. 21... so far I've figured the main idea would
be if hand<21 execute input,,,else bust

also have questions with a few other of my labs such as method
overloading.. does anyone know how to add strings of numbers,, ex:
12,4,5,6,6 = 34,, but using the charAt() and such... I've got most of
the code written, I just can't figure out how to add them together...
how does it know when there's a number or a comma??? some kind of
loop,,.. help :(

Last but not least... Area 51... I have to make an applet that puts up
a grid of long/lat. ,, blue background, and 5 island using the
g.drawPolygon.. easy enough, and I have all of that applet written,
but the problem is,, you have to have a button to show a UFO on the
screen, that moves, but a button controls the movement and you must
record the speed and all that jazz with it.. if you want, I can get
you a link to all the rules etc...

Someone please help me out here,,, i'm really stuck and I can't figure
any of this shit out... Thanks!!!

JFizzR
 
J

Jose Rubio

We're not Santa Claus. Go to the mall and sit on his lap. Maybe he can help
you out!!!

Jose
 
A

Anthony Borla

JFizzR said:
I need a number of things here to catch up with my java
programming class, and I turn to you guys, the experts,
for help...

Presumably you [or maybe your parents] pay for your education. So why waste
your course fees by not doing the assigned work [in a timely fashion], and
trying to learn the stuff ?

Catch up on about four course assignments - you've got to be kidding ? Good
luck digging yourself out of this mess - I doubt anyone here is going to
help.

Anthony Borla
 
J

Jeffrey Palm

JFizzR said:
<snip>
Someone please help me out here,,, i'm really stuck and I can't figure
any of this shit out... Thanks!!!

JFizzR

Switch majors.

Jeff
 
R

Roedy Green

Last but not least... Area 51... I have to make an applet that puts up
a grid of long/lat. ,, blue background, and 5 island using the
g.drawPolygon.. easy enough, and I have all of that applet written,
but the problem is,, you have to have a button to show a UFO on the
screen, that moves, but a button controls the movement and you must
record the speed and all that jazz with it.. if you want, I can get
you a link to all the rules etc...

See http://mindprod.com/product.html#SCREWS
for an example of a basic drawing program.

I think you are going to flunk this course because if you have let
yourself get so far behind, and if you can't add up some numbers, you
have no hope of solving this one. If you try this course again next
year, don't think you can cram at the last minute like you can a
history exam. It is simply impossible. You have to work a little at
it each day.
 
J

Jay O'Connor

Anthony said:
I need a number of things here to catch up with my java
programming class, and I turn to you guys, the experts,
for help...
<SNIP CODE>



Presumably you [or maybe your parents] pay for your education. So why waste
your course fees by not doing the assigned work [in a timely fashion], and
trying to learn the stuff ?

Catch up on about four course assignments - you've got to be kidding ? Good
luck digging yourself out of this mess - I doubt anyone here is going to
help.


One of those cases where I think to myself...."Do I really want to help
this person become a member of my profession?"
 
J

JFizzR

Roedy Green said:
See http://mindprod.com/product.html#SCREWS
for an example of a basic drawing program.

I think you are going to flunk this course because if you have let
yourself get so far behind, and if you can't add up some numbers, you
have no hope of solving this one. If you try this course again next
year, don't think you can cram at the last minute like you can a
history exam. It is simply impossible. You have to work a little at
it each day.


My parents don't pay for my education, I do... my problem is, I had my
computer serviced because the motherboard fried.. it's a brand new
dell,, who knows,, anyway... instead of taking 3-5 days, it took 17
days to fix.. yes, 17 days.. this put me SOOO far behind on the class,
I have no other option other than to turn to you guys for help.. I do
appreciate the sites, and I will check them out...

I'm not sure who said change my string to an int to add them
together,,, but,, this would be the easy way,,, the assignment calls
for me to add the numbers together AS A STRING... it's a pain in the
ass...

Please don't think i'm lazy guys,, i've tried to understand this stuff
from the notes I took while I didn't have my computer, with no
avail... not only did I get 5 assignments behind during this downtime,
but of course I get the regular 2 assignments a week tacked on...

I'm not one to ask internet people for help, but I know there's many
talented programmers out there that may be able to show me door so I
may walk through... Thanks again for your help guys, I hope this
clears things up a bit
 
N

nos

so why didn't you go to the computer lab when your
machine was busted
(i suppose you are going to reply that it doesn't have what you need)
 
S

Sudsy

nos said:
so why didn't you go to the computer lab when your
machine was busted
(i suppose you are going to reply that it doesn't have what you need)

Don't presuppose. Whatever the TRUE situation of this poor soul,
plaintive requests for assistance have apparently fallen on
cynical ears.
That's not really surprising as the requests for homework help
rise and fall in accordance with the academic calendar.
Blaming vendor X is not likely to result in an outpouring of
genuine offers of assistance.
OTOH, there are obviously a lot of really smart people who
lurk on this newsgroup. Offer up a challenge, demonstrate that
you've made an effort and you might be surprised and edified
by those individuals.
I guess it comes down to asking the right questions... ;-)
 
J

jb

My parents don't pay for my education, I do... my problem is, I had my
computer serviced because the motherboard fried.. it's a brand new
dell,, who knows,, anyway... instead of taking 3-5 days, it took 17
days to fix.. yes, 17 days.. this put me SOOO far behind on the class,
I have no other option other than to turn to you guys for help.. I do
appreciate the sites, and I will check them out...

I'm not sure who said change my string to an int to add them
together,,, but,, this would be the easy way,,, the assignment calls
for me to add the numbers together AS A STRING... it's a pain in the
ass...

Please don't think i'm lazy guys,, i've tried to understand this stuff
from the notes I took while I didn't have my computer, with no
avail... not only did I get 5 assignments behind during this downtime,
but of course I get the regular 2 assignments a week tacked on...

I'm not one to ask internet people for help, but I know there's many
talented programmers out there that may be able to show me door so I
may walk through... Thanks again for your help guys, I hope this
clears things up a bit


pseudo code...work the details out for yourself.
string str = "1,2,3,4,5,6";

vector<int> nums = tokenize(str); // write this func youself

for(...nums.size..);
sum += nums;
 
S

Scott Ellsworth

My parents don't pay for my education, I do... my problem is, I had my
computer serviced because the motherboard fried.. it's a brand new
dell,, who knows,, anyway... instead of taking 3-5 days, it took 17
days to fix.. yes, 17 days.. this put me SOOO far behind on the class,
I have no other option other than to turn to you guys for help.. I do
appreciate the sites, and I will check them out...

Your best bet is to do the following three things.

1. Go to your instructor, and ask for an extension. He/she likely does
not care about your tale of woe, but is probably more interested in
having you learn the material than cheat. I, at least, found that my
teachers never cared much about _why_ I wanted another few weeks, but
they _always_ gave such extensions on the four occasions I remember
asking for them in college. Had they wanted to know, I would have told
them, but they really just wanted me to learn the material.

2. Look at each of your assignments as a chance to learn the topic it
is to present. If we give you the answer to one of these early ones,
you will not now it later. A good hint, on the other hand, might help
you understand enough now to be able to do the later stuff.

3. Now that you have the time and the energy to do each assignment,
break them down. Start with the easiest, which is likely the first.
See how much you can do on your own, which includes typing in some code
and running it. If you do not know how to do a specific task, put in a
line like "System.out.println("Turn '1,2,12' into the ints 1, 2, and 12,
then add and convert the resulting 15 back into the string '15'");

This is your pseudo code, and forms the basis of a real question.

4. You will hit a wall. We all do. At that point, ask for specific
help. For example:

"The attached program will turn '1','2','12' into the strings '1', '2',
and '12', but I have no idea how to add those strings to get 15. Do I
have to convert it to an int?"

You will then be much more likely to get actual help. For instance, I
could rattle off the top of my head the answer to the three or four
questions I suspect you will have about this problem, but if I guess
wrong about your questions, you will not be helped.

Starting point:
1. How to break up a string into substrings based on a delimiter
2. How to interpret each one as an int
3. How to add those ints
4. How to convert back.

Try to write the program that does these four things, and see where you
run into difficulty. Post your code, what you think it should do, and
what it actually does.

Scott
(e-mail address removed)
Java, Cocoa, WebObjects, and Database consulting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top