These are chat archives for MontCode/GeneralChat

16th
Feb 2017
denisemathis
@denisemathis
Feb 16 2017 16:49
Okay. sounds good.
David Castner nice work.
Lily Romano
@Lilyheart
Feb 16 2017 21:51
Anyone working on a fun project tonight?
Robert Marcy
@Ryzilynt
Feb 16 2017 21:55
If you think trying to figure out how to create and manipulate a linked list is fun, then yes!!
Lily Romano
@Lilyheart
Feb 16 2017 21:56
oooooh linked lists. I used lego to piece it out xD
lego is fun. xD
denisemathis
@denisemathis
Feb 16 2017 21:56
Hi Everyone...
Robert Marcy
@Ryzilynt
Feb 16 2017 21:57
Having trouble with the swapStart method and the toString.
I think something i'm doing is preventing them from playing nice together
swapStart() should swap the position of the two objects on the top of the stack. And i think this does that correclty
public boolean swapStart()
{
LLNode top2 =top;
if (top.getLink() == null)
return false;
    else
    {
        for (int i = 1;i>0;i--)
        {

        top = top.getLink();
        top.setLink(top2);
        }

      return true;
    }
Lily Romano
@Lilyheart
Feb 16 2017 22:00
you can walk through the code in the debugger to see. Using jGrasp?
denisemathis
@denisemathis
Feb 16 2017 22:00
I am just starting down the path of Visualize Data Challenge...
Robert Marcy
@Ryzilynt
Feb 16 2017 22:01
i guess I can try that, jgrasp is not my native IDE
Lily Romano
@Lilyheart
Feb 16 2017 22:01
me either, but jgrasp is divine for visualizing linked list using the canvas view.
your for loop will only run once. you initialize i to 1, then decrement but only run the loop while i > 0 meaning after the first loop i becomes zero so it doesn't run again.
Robert Marcy
@Ryzilynt
Feb 16 2017 22:05
its only supposed to run once
Lily Romano
@Lilyheart
Feb 16 2017 22:05
then you don't need a loop
Robert Marcy
@Ryzilynt
Feb 16 2017 22:06
i guess i dont need the loop at all then
ok thats fixed, here are my driver results
run:
Test 1 - Baseline:
Turtle
Test 2 - toString:
Sweet
Ethereal
Shredded Wheat
Toaster
Test 3 - Array Size:
4
Test 4 - popSome:
Shredded Wheat
Toaster
Test 5- swapStart:
Toaster
Shredded Wheat
Toaster
Shredded Wheat
the toString just repeats test five indefintely until process is cancelled
Lily Romano
@Lilyheart
Feb 16 2017 22:09
Yeah.
Explaining over chat is gonna be a pain. I'mma send you a Private Message
Lily Romano
@Lilyheart
Feb 16 2017 23:04
@denisemathis I haven't tried the data viz section yet. Let me know how it is!
@Ryzilynt if you want to do a screen cast some time not today about linked list and Jgrasp I can show you how to use it to do the visualization of what is going on.