I dont believe so, its just the acmlibrary
Type: Posts; User: connorlm3
I dont believe so, its just the acmlibrary
This program shows a pacman like figure moving right across the screen using GArcs. I run my program and it doesnt even show the first PacMan garc that I have added. Any Help?
Heres my code:
...
A GCompound, I found a a sample of one, I got my program working. It makes a house as a gcompound object, then bounces it around the screen. Thanks for replying though!
Hi, Im needing to make a house as a compound object then bounce it around the screen. I can not find a tutorial or anything on how to make a compound object. Can anybody point me to one? A tutorial...
Can anyone help me and let me know why this is going out of bounds? Its throwing the exception on line 41
The program is suppose to take a GImage and rotate it 90 degrees.
/*
* Mat2670...
Hi, i've been working on a hangman java game. I have a lot of it coded, but when I go to run it, Im getting stuck somewhere I believe on line 64. I put a print statement before line 64 and it is...
Ok, i changed it to where its updating the entry into guess
still not working though. >.< it isnt exiting the while loop? even when guess and nCode match. So am I using the .equals method wrong?
...
Heres current version:
package mat2670;
import java.util.*;
public class Mastermind {
But, program still isnt working right.
--- Update ---
Choose the length of the number you will be trying to guess:
2
Enter your guess:
12
How many digits is determined by the user. i tried changing to loop to go from i = n; i > 0; i-- but it was giving me index out of bounds exceptions
--- Update ---
I got it, changed loop to...
Thanks for that, and no. it doesnt :( lol it prints it out backwards. need it to have 1,2,3,4 if the user enters 1234
Enter your guess:
1234
Guess Array Contains [4, 3, 2, 1]
Kind of, but im taking an int in from the scanner. I wasnt thinking about how it would act at first. If a user entered in 1234, that would be the array would only have 1 number in it at array[0],...
.. I understand that, I was only asking because my professor told me to get the code from another student and see how they accomplished it.
the values of which variables? the rightspot wrongspot or the numbers in the arrays?
--- Update ---
whoah, why would i be getting this? I added print statements after my if-else-if to print...
A guy in my cs class sent me an answer to a program that I didn't get working correctly last week. He's not responding to my emails so I figured I'd ask here. So, i copied and pasted the code tried...
Im required to make a variation ot the mastermind game. The program uses random numbers to generate a n-digit number. The user chooses the length of the number, n. The user should be allowed to make...
Ok, thank you very much for your help, I can now get the number with the strategy you have helped me with, I've got it converting to an int also that i can add to a running total.
when i print the string there, the output gives me this [Mary, F, 1234]
if (nextLine.contains(genName)) {
String[] numbers =...
Ok i see how the split method works now, if i make a string like String tosplit = new String(","); and i use it in split, it just puts spaces in the string after the commas? I dont see how that could...
Would something like this work.
if(nextLine.contains(genName)) {
int length = nextLine.length();
...
arrays? where are arrays coming into this? you lost me now. and ok i found the method for the string to int conversion. still confused where arrays are coming into play at.. and if i try running my...
So in the java docs i found this
String[] split(String regex)
Splits this string around matches of the given regular expression.
Trying to understand what it means, and how to...
well how i have it set up is what im searching the file for would be like this "Mary,F" and i already have the line that contains that as a string. How does this split method work?
I have a program where a user enters a name and a gender, then the program is suppose to read through all these yob####.txt files to see if it contains that name,gender. if it does, i need to be able...
Gahhhh I didn't check that. I think im missing some test cases. Im going to write them all out to see what im missing. If i need more help I will post. Thanks!