User Profile

Collapse

Profile Sidebar

Collapse
slapsh0t11
slapsh0t11
Last Activity: Dec 9 '09, 08:53 AM
Joined: Oct 15 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • slapsh0t11
    started a topic Knight's Tour Project
    in Java

    Knight's Tour Project

    Hello,
    I know this is a popular problem with a lot of solutions, but I don't want to be pointed to a post by someone else with THEIR solution. I want to figure out how to make my own code work. So, any help you could provide would be wonderful!

    So, what I'm trying to do is solve the Knight's Tour problem (without a GUI) and print the result as follows:


    Now, of course this is not the correct answer since...
    See more | Go to post

  • Yes, I see that. I actually caught that mistake minutes before I read your post. :) Thank you so much for the help though. Your advice on the toroidal structure was very useful. Much thanks.
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    started a topic Game of Life. I've isolated where the problem is
    in Java

    Game of Life. I've isolated where the problem is

    So, I've been working on this Game of Life (http://www.bitstorm.or g/gameoflife/) project, and all the code has been written. However, it will not run. First, I will post the error message and the fragment of code I think to be the cause of the problem. Then, I will post the code to all 3 of my java files in their entirety should you wish to reference them. Any help would be much appreciated.

    Also, if it would help fix my error,...
    See more | Go to post

  • slapsh0t11
    replied to CountWords Assn.
    in Java
    NOTE: this is not a homework assignment for a grade. It is simply a problem my teacher has given my class to as optional review. So, helping me figure out were I went wrong would allow me to further my currently limited knowledge of Java.

    Again, if anyone is willing to help me find the error in my program that leads to this incorrect output, that would be much appreciated! Thanks again.

    I have traced through my...
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    started a topic CountWords Assn.
    in Java

    CountWords Assn.

    I would greatly appreciate it if any one of you kind souls could take some time to help me out with an interesting bug in my program. I have tried many times to find the source of the problem unsuccessfully and believe that a second set of eyes will do wonders. Thanks in advance for reading my post.

    *************** *************** ***

    So, after quite some work, I was able to get this program to run (I am a bit of a...
    See more | Go to post

  • slapsh0t11
    replied to Quadratic Sorting Algorithm Program
    in Java
    BUMP. I still need help getting the step values correct for each sorting algorithm.
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    replied to Quadratic Sorting Algorithm Program
    in Java
    UPDATE: I made a bad typo that prevented the program from running in the first place. I have that resolved now. Line 41's list.get(temp) should read simply "temp"

    HOWEVER! I would still like you guys to assess my += operations on the steps variable to see if I have the correct values being added. I would like to compare the number of steps necessary for each sorting algorithm across the board. Thanks!
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    replied to Quadratic Sorting Algorithm Program
    in Java
    I also have a more specific question regarding my use of the variable STEPS to count how many comparisons, gets, and sets are made for each of the three sorting algorithms in this program. Are my values for "STEPS += ??" correct? If not, what should they be and why?
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    started a topic Quadratic Sorting Algorithm Program
    in Java

    Quadratic Sorting Algorithm Program

    Hello! I need help with a program that I believe I am nearly done with. However, there seems to be a few details that preclude me from success. Here is my assignment:



    Here is my class file (Sorts.java):
    Code:
    import java.util.*;
    
    /**
     *  Description of Class
     *
     * @author     Blake Walsh
     * @created    October 20, 2009
     */
    public class Sorts{
    ...
    See more | Go to post

  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    Thank you so much!! The program runs correctly now, with the exception of the area calculation...c ould you take a look at that algorithm for me?

    Here's what it actually is:
    0.5(X0*Y1 + X1*Y2 + ... + XN-1*Y0 - Y0*X1 - Y1*X2 - ... - YN-1*X0)

    Can you check my area() method to see what might be giving me the incorrect output? I can't quite see what's wrong...maybe another set of eyes will help.

    Here's...
    See more | Go to post
    Last edited by Frinavale; Oct 15 '09, 03:27 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

    Leave a comment:


  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    So, I redid the IrregularPolygo n Class, and here's the new error message I got:
    Enter another point? (Y/N)Exception in thread "main" java.lang.Index OutOfBoundsExce ption: Index: 1, Size: 1
    at java.util.Array List.RangeCheck (Unknown Source)
    at java.util.Array List.get(Unknow n Source)
    at IrregularPolygo n.perimeter(Irr egularPolygon.j ava:47)
    at IrregularPolygo nTester.main(Ir regularPolygonT ester.java:27)...
    See more | Go to post
    Last edited by Frinavale; Oct 15 '09, 03:27 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.

    Leave a comment:


  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    Sorry, but that didn't help much - even though I've spent the last hour or so working on this problem. I'm still quite new to Java, so a more thorough explanation of what it is I need to do would be much appreciated!
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    Isn't this the ArrayList to which myPolygon refers?

    ArrayList <Point2D.Double > myPolygon = new ArrayList <Point2D.Double >();
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    I'm not sure I quite understand the nature of this problem or how to go about resolving it. Why does it matter if the myPolygon ArrayList is null (aka empty) if I add values to it (make it NOT null) before I try to do anything else with it? Have you been able to get this code to work?

    Again, I really appreciate all of your help!
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    replied to Irregular Polygon Program
    in Java
    Thank you for your reply! - still need help though!

    The program does compile, but something seems to be going on with the line I indicated in my code as well as in the toAdd method in the non-tester file.


    Here is the error message I keep receiving:

    Enter X-Coordinate: 3
    Enter Y-Coordinate: 4
    Exception in thread "main" java.lang.NullP ointerException
    at IrregularPolygo n.toAdd(Irregul arPolygon.java: 28)...
    See more | Go to post

    Leave a comment:


  • slapsh0t11
    started a topic Irregular Polygon Program
    in Java

    Irregular Polygon Program

    Here is my assignment that I need help with:
    1. Implement a class IrregularPolygo n that contains an array list of Point2D.Double objects.

    2. The Point2D.Double class defines a point specified in double precision representing a location in (x, y) coordinate space. For example, Point2D.Double( 2.5, 3.1) constructs and initializes a point at coordinates (2.5, 3.1).

    3. Use the following declarations as a starting point...
    See more | Go to post
    Last edited by Frinavale; Oct 15 '09, 03:25 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
No activity results to display
Show More
Working...