Search:

Type: Posts; User: waltershc

Search: Search took 0.10 seconds.

  1. Re: Rather beginner level programming; need assistance.

    Well that explains that. I think I have the timeout feature figured out. Thanks for all of your help yet again.
  2. Re: Rather beginner level programming; need assistance.

    I have not. I input the loop counter into my code and now it shows that it works AND completes rather quickly. Here is the new code with the counter.



    //algorthm 1
    //cubic maximum...
  3. Re: Rather beginner level programming; need assistance.

    I think it is freezing because I have a pretty stout computer and left it for a few hours and didn't receive anything back. Either way, I will add that line to my code when I get out of class. ...
  4. Re: Rather beginner level programming; need assistance.

    Okay, I will play around with that.

    One final thing, my instructor just told me to just add some time that 'times out' when the program gets stuck for more than 10 minutes. I would need to encase...
  5. Re: Rather beginner level programming; need assistance.

    I added in some code to print to console as the 3rd set of algorithms execute and it turns out the 3rd and 4th algorithms are working properly. It is the 1st and 2nd that are hanging it up. Where...
  6. Re: Rather beginner level programming; need assistance.

    I moved everything into one class and now the program is partially working. The algorithms run on the 10.txt file in 0 nanoseconds; all three times. Idk if that is normal or not. The algorithms...
  7. Re: Rather beginner level programming; need assistance.

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    The method maxSubSum1(int[]) is undefined for the type driver
    The method maxSubSum2(int[]) is undefined for the type...
  8. Re: Rather beginner level programming; need assistance.

    It's not running when I call the algorithm methods. I get a 'this method [insert algorithm method here] is undefined for type driver.'
  9. Re: Rather beginner level programming; need assistance.

    figured it out using common sense and also using your suggestion to close scanners that are no longer needed. let me do some more poking with my main class and I will come back with any questions. ...
  10. Re: Rather beginner level programming; need assistance.

    I do not believe I am closing the files as I have no idea what you are talking about.

    edit- norm, please note i also just updated my driver class with a more final approach.
  11. Re: Rather beginner level programming; need assistance.

    import java.io.IOException;


    public class driver {

    public static void main(String[] args) throws IOException{

    long startTime, endTime, average;
    System.out.println("Started.");
  12. Rather beginner level programming; need assistance.

    I am trying to code my program to populate three different text files with randomly generated integers. The amount of integers in the text files are 10, 10 000, and 1 000 000. So the 'ten.txt' file...
Results 1 to 12 of 13