Programming tutorials online .NET, Java, C++, Visual Basic, and More

.NET Tutorials
General Programming Tutorials
Site Extras


General Forum

Un-moderated developer's forum for discussing any programming topics, languages, issues or whatever you feel like.

Posted By: maig   4/30/2006 4:08:00 PM
Java Student needing help...

Hi, I'm really new to programming and I'm having a lot of trouble. My first assignment is to finish a program for a simple guessing game. I'm not sure if anyone can help without knowing all the code in all of the classes but here it goes...

I have to complete this method:

/* Invokes getRandomCoordinates() to put a specific value into the number of grid positions specified byt the first
parameter, e.g. setRandomCoordinates(5, 'T') will se the target char 'T' into 5 different locations in the grid on
which it is invoked. This method will be invoked on the
working grid.
@param the number of randomly-generated coordinates to set with the value,the target value to set*/

public void setRandomCoordinates(int numCoordsToSet, char valueToSet)
// use a loop to complete this method

Ok, so i know I have to invoke the method getRandomCoordinates and I have to make sure that the coordinates don't already have the 'T' char in it, but I have not idea how to actually write the code.

Can someone give me a push in the right direction?

Sign In
  Forgot my password


Featured Book

Introducing Microsoft .Net, Third Edition ($19.79)
Introducing Microsoft .Net, Third Edition

Featured Software

Microsoft Visual Studio Standard 2005 ($249.99)
Microsoft Visual Studio Standard 2005