Search:

Type: Posts; User: Flcha

Search: Search took 0.10 seconds.

  1. Replies
    2
    Views
    1,743

    Scanner with problem

    Hello guys :)
    Here I am again, now with a problem in I/O.

    The objective of this program is to input a word in the terminal/console and then the scanner would search the word in a specific txt...
  2. [SOLVED] Re: Problems getting value of index in 2D array operation

    I used the breakpoint and when it arrives to the step of the "For loop" it jumps to the end of the program...
    If I change size=4. the terminal window will display 16 results

    Now I can tell what...
  3. [SOLVED] Re: Problems getting value of index in 2D array operation

    Hi Greg.
    I can't tell you the result of the operation, because the terminal window doesn't show me anything.
    About the variable size, I don't know. I just copied this small line of code from my...
  4. [SOLVED] Problems getting value of index in 2D array operation

    Before starting to tell the problem with my method, I want to greet everyone in Java community :)

    This time, I have a problem with an 2D array.
    Arr is of integer type with dimensions of [4][4]....
  5. Replies
    13
    Views
    2,530

    [SOLVED] Re: Moving object in the y-axis

    Greg

    I tried this and now works ;)
    I took off the rotationinRadians=0.0; and did other small modifications
    see

    public void moveForward(int dist)
    {
  6. Replies
    13
    Views
    2,530

    [SOLVED] Re: Moving object in the y-axis

    Ok.

    I will repost again all the code of car2 class (the class that I'm working in)


    import comp102x.IO;
    import comp102x.Canvas;
    import comp102x.ColorImage;

    /**
  7. Replies
    13
    Views
    2,530

    [SOLVED] Re: Moving object in the y-axis

    No matter what I do, the car only moves in the x-axis. It's like it's not recognizing the y-axis coordinates.

    I suppose will be this

    ...
    carImage.setX(carImage.getX() + (int)distX);
    ...
  8. Replies
    13
    Views
    2,530

    [SOLVED] Re: Moving object in the y-axis

    Thanks for your fast reply.

    The program doesn't use the paint component.
    And yes, I know some basic trig, although it was very long time that I studied that.

    And sorry because I forgot to post...
  9. Replies
    13
    Views
    2,530

    [SOLVED] Re: Moving object in the y-axis

    Sorry :\
    Here it goes...



    public void moveForward(int dist)
    {
    // Obtain the current rotation in degrees
    int rotationInDegrees = carImage.getRotation();
    //...
  10. Replies
    13
    Views
    2,530

    [SOLVED] Moving object in the y-axis

    Hi guys,

    I'm new in this forum and I'm using it to help me in my coding classes.

    I just have one problem with a "car" program in java.
    The objective is to move the car in the direction it is...
Results 1 to 10 of 10