Computer Science Canada Help jelly beans guessing game |
Author: | asianrandy [ Wed Nov 17, 2010 5:02 pm ] | ||||
Post subject: | Help jelly beans guessing game | ||||
i need help with jelly beans gussing game. 1. Asking the user to enter how many people will be making guesses today. Use this number to size your arrays. 2. Create an array of type String to hold the players? names, and create an array of type int to hold the value of their guess.
k i edit my code but firstName can't be a variable and lm stuck help
|
Author: | asianrandy [ Thu Nov 18, 2010 7:35 pm ] |
Post subject: | RE:Help jelly beans guessing game |
NVM i got it |
Author: | conman14 [ Thu Nov 25, 2010 9:08 pm ] |
Post subject: | Re: Help jelly beans guessing game |
could you show me your final code? |
Author: | SS1389 [ Thu Nov 25, 2010 10:15 pm ] |
Post subject: | Re: Help jelly beans guessing game |
For the holder array, you can work with it like this: final int SIZE = 0; int[] holder; Scanner sc = new Scanner(System.in); System.out.print("Enter the number of players: "); SIZE = sc.nextInt(); holder = new int[SIZE]; Hope that helps! |
Author: | conman14 [ Mon Nov 29, 2010 6:55 pm ] |
Post subject: | Re: Help jelly beans guessing game |
im stuck with calling a method could anyone help? |
Author: | Tony [ Mon Nov 29, 2010 7:20 pm ] |
Post subject: | RE:Help jelly beans guessing game |
@conman14: What method? |
Author: | SS1389 [ Tue Dec 14, 2010 8:56 pm ] |
Post subject: | Re: Help jelly beans guessing game |
[access_level] [static] [return type] identifier ([formal parameters]) |
Author: | TheGuardian001 [ Tue Dec 14, 2010 9:12 pm ] |
Post subject: | Re: Help jelly beans guessing game |
SS1389 @ Tue Dec 14, 2010 8:56 pm wrote: [access_level] [static] [return type] identifier ([formal parameters])
That's how to define a method, not how to call one. It's also a pretty useless post, as you simply posted a definition template without any kind of explanation. |
Author: | SS1389 [ Tue Dec 14, 2010 9:21 pm ] |
Post subject: | Re: Help jelly beans guessing game |
Oops. Excuse my hurriedness. To call a method, simply call the identifier. i.e. If I wanted to call my formula method, I would use formula (formal parameters); i.e. public static int formula(int x, int y) call: formula(x, y); |