Hi, How do I read one word at a time in a .txt file? Thanks
Type: Posts; User: dazzle1218
Hi, How do I read one word at a time in a .txt file? Thanks
Hi,
I was just wondering, how do I read a .txt file into my program even though i do not know the name of the file? Thanks :)
BufferedImage equalizeimage= new BufferedImage(source.getWidth(), source.getHeight(), source.getType());
int red;
int blue;
int green;
int newRGB = 0;
//to compute the...
I know i have to do that but i dont know how to write it out so that i dont get any errors
--- Update ---
can you please provide an example as to what my code should look like?
i have been trying that for about the last 4 hours, i really have no idea how to do it. I honest dont understand the logic a code follows. Can you PLEASE help????
Basically
Execute a time step for...
do you know how to write the section of code under : public void executeStep() ????
<package langton;
public class LangtonAnt{
import simulation.Ant;
import simulation.Grid;
import simulation.Simulation;
import core.Direction;
Basically i have been given a template for the code that i need to complete, in the end it should out put this:
Description: Write a program to simulate an “ant” moving one step at a time on a...
<package simulation;
/**
*
* Simulation class
*
* @author _________
*
*/
public class Simulation {
<package langton;
public class LangtonAnt{
import simulation.Ant;
import simulation.Grid;
import simulation.Simulation;
import core.Direction;
here is the additional information
package core;
public enum Direction {
NORTH, SOUTH, EAST, WEST;
}
--- Update ---
package core;
public enum Direction {
NORTH, SOUTH, EAST, WEST;
}
--- Update ---
package simulation;
package simulation;
/**
*
* Simulation class
*
* @author _________
*
*/
public class Simulation {
package simulation;
/**
*
* Grid class
*
* @author _________
*
*/
public class Grid {
package langton;
public class LangtonAnt{
import simulation.Ant;
import simulation.Grid;
import simulation.Simulation;
import core.Direction;