Search:

Type: Posts; User: javapenguin

Page 1 of 2 1 2

Search: Search took 0.11 seconds.

  1. [SOLVED] Re: Very complex project. It's hard to explain.

    He said that for even number of times, or something like that, it will end up in the to Queue at the end.

    I knew that my code was closer, but you said it wasn't replacing like it should.

    I...
  2. [SOLVED] Re: Very complex project. It's hard to explain.

    Is that with mine or with yours or with both?

    :confused:
  3. [SOLVED] Re: Very complex project. It's hard to explain.

    What is wrong with:

    // this class takes in productions and generates turtle commands.

    import java.util.ArrayList;
    import java.io.*;
    import java.util.*;

    public class program6_part_3
    { //...
  4. [SOLVED] Re: Very complex project. It's hard to explain.

    // this class takes in productions and generates turtle commands.

    import java.util.ArrayList;
    import java.io.*;
    import java.util.*;

    public class program6_part_3
    { // beginning of class
    ...
  5. [SOLVED] Re: Very complex project. It's hard to explain.

    Just got a response back.

    Am I doing it right?
  6. [SOLVED] Re: Very complex project. It's hard to explain.

    Why are you popping from "from"?


    // this class takes in productions and generates turtle commands.

    import java.util.ArrayList;
    import java.io.*;
    import java.util.*;

    public class...
  7. [SOLVED] Re: Very complex project. It's hard to explain.

    Not to seem like an idiot, but I have never done a switch structure before.

    How would you fix this code to get one and then work for the last step?


    // this class takes in productions and...
  8. [SOLVED] Re: Very complex project. It's hard to explain.

    Here's what he said for part 3:

    Part 3: Generating Turtle Commands
    Many of the above files for turtle commands have been generated algorithmically. This is done by using “productions”. A...
  9. [SOLVED] Re: Very complex project. It's hard to explain.

    For the code:

    for (int iter =0; iter < numberOfIterations; iter++)
    { // beginning of for

    for (int iter2 = 0; iter2 < from.Size(); iter2++)
    { // beginning of for...
  10. [SOLVED] Re: Very complex project. It's hard to explain.

    Ok, but I'm only reading in from "from" and putting stuff in "to": How does he want me to swap it?

    I'm wondering if he means to then do the same with to and read it into from, then do the same...
  11. [SOLVED] Re: Very complex project. It's hard to explain.

    Does my code do that?

    If not, how do I do that?

    ~X(~X(~X(~X(~X(~X(~X(~X(~X(~X(~X(^:)^
  12. [SOLVED] Re: Very complex project. It's hard to explain.

    I want str to contain right hand side.

    c contains left hand side

    Did I do something wrong?
  13. [SOLVED] Re: Very complex project. It's hard to explain.

    Any idea what he means by swap "from" and "to"

    Here's what he said:

    4. For each iteration:
    a. For each character that you remove from the “from” queue:
    i. If it is the left side of any...
  14. [SOLVED] Re: Very complex project. It's hard to explain.

    How do I get it so that it'll check to see if the thing is in any of the productions?

    Right now it'll just check to see if is in the last production at the end of the for loop.
  15. [SOLVED] Re: Very complex project. It's hard to explain.

    // this is class StateOfTurtle, it has a constructor to set the x,y, and angle values. It calls setX(), setY(), and setAngle().
    // it has a method to return the StateOfTurtle object. It also has...
  16. [SOLVED] Re: Very complex project. It's hard to explain.

    Ok, is my line of codes

    for (int penguin = 0; penguin < numberOfProductions; penguin++)
    {
    // should read in single character that is on left side of production.
    c =...
  17. [SOLVED] Re: Very complex project. It's hard to explain.

    Well, you get the picture. It won't let me upload anymore.

    I hope they fix that glitch soon!
  18. [SOLVED] Re: Very complex project. It's hard to explain.

    Uploading more files.

    Also, are there any typos in the part 2 files? The part 2 files are the text files I'm uploading now, the previous set were the part 3 files, and all code blocks but the...
  19. [SOLVED] Re: Very complex project. It's hard to explain.

    I already took care of that part.

    I was just wondering if it would work for part 2?

    These will help.

    As will the next load of files.

    That will make things easier to understand what I'm...
  20. [SOLVED] Re: Very complex project. It's hard to explain.

    // this is class StateOfTurtle, it has a constructor to set the x,y, and angle values. It calls setX(), setY(), and setAngle().
    // it has a method to return the StateOfTurtle object. It also has...
  21. [SOLVED] Re: Very complex project. It's hard to explain.

    Well, how do you copy the StateOfTurtle object into an exact copy, but independent copy, of that object?

    It shouldn't change references when the original StateOfTurtle object does. In other...
  22. [SOLVED] Re: Very complex project. It's hard to explain.

    public class StateOfTurle
    {
    private float x;
    private float y;
    private float angle;

    public StateOfTurtle(float x, float y, float angle)
    {
    x = this.x;
    y = this.y;
  23. [SOLVED] Re: Very complex project. It's hard to explain.

    I'm kind of editing them up above so that I don't keep having to post the same info over and over again with just a few alterations.

    Also, I think I've figured out what to do for part 2 and kind...
  24. [SOLVED] Re: Very complex project. It's hard to explain.

    public void remove(int index)
    {
    if ((index<0) || (index>=size))
    {
    JOptionPane.showMessageDialog(null, "You cannot remove an out-of-bounds value!", "Invalid removal",...
  25. [SOLVED] Re: Very complex project. It's hard to explain.

    Ok, I think it's fixed now. Now any idea how I can do part 3?
Results 1 to 25 of 29
Page 1 of 2 1 2