Search:

Type: Posts; User: javaStooge

Page 1 of 4 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    1
    Views
    118

    A Stack For Notation

    Hello guys, I'm dealing with stacks and the general concept if pretty straightforward (FILO/LIFO). I'm using a stack to reformat an infix equation to postfix and prefix notation. I've seen several...
  2. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    I realized my Node type does not need a generic type (located in the Node class), but then I get the error above when I remove it. Is there a way to avoid this? I've also tried to define the type,...
  3. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    *Updated* I forgot to add the exception class. :(|)

    I've outlined the linkedlist concept on pen and paper, and feel I have a fairly good grasp of it. (I'll be sure to use the "process" you...
  4. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    main

    public class MainClass {

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

    // StringX star = new StringX("Betelgeuse");...
  5. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Hey Norm, walked away for a bit.

    The error after compiling.


    Now, I made a quick change and I got the newMember to print..by some miracle. It is still throwing the error though. Line 128 is...
  6. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    I've checked my code against several different source and I don't see any serious difference. there is nothing unique about my code and yet it still returns a nullpointer error. Can you guys please...
  7. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    temp.next will have the address of the current head node...but it will contain the newest member in the list. Head should always remain the first link in the list -- that is why I used newNode =...
  8. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Ok, lets start with the addToFront method:
    1. I understand the if statement...its saying if a node is empty, add the new node with its member, assign it as head, and link it with old head.
    2. If...
  9. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Would you mind explaining to me exactly what is going on here. What is newNode.next = tail accomplishing? In my class NodeList, next is defined as NodeList<T>...which is the format I've adopted from...
  10. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Thank you guys. I thought so, but I just wanted to make sure -- I saw an example where they created separate classes for the two but they weren't using generics.


    public class NodeList<T> {...
  11. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Is it possible create a single Node class (Node<T>) that can account for a list for integers and a list for strings? Or is it better to create a separate class to do this?
  12. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    I'm not trying to compile it yet...I'm not ready for that. I have my other classes...I just provided the class with the issue. I thought the issue was contained within this class alone.
  13. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    public class MySinglyLinkedListD<T> implements SinglyLinkedList<T> {

    protected ListNode<T> head, tail, current;
    String name;
    int size = 0;

    //Simple constructor
    ...
  14. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    That is all the error message contained.

    next() is defined within the same class where I am trying to use it---that's what I don't understand. I'm having the same issue when I try to use my...
  15. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    Posted here to make sure it notified you.

    cannot find symbol
    symbol: method next()
    location: variable newNode of type ListNode<T>
    where T is a type-variable:
    T extends Object declared in class...
  16. Replies
    33
    Views
    230

    [SOLVED] Re: LinkedList -- insert()

    The hasNext() method supposed to return whether the next element or node is empty and return that node or return the node value.
    I'm having a little trouble with the next() method. I want to test...
  17. Replies
    33
    Views
    230

    [SOLVED] LinkedList -- insert()

    For this program I am dealing with the linkedlist interface. I am designing a method "insert" that will add a new member to a specified location provided by the user (public insert(T newMem, int...
  18. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    Fantastic. Thank you Norm.

    I created the splits, but when I run the program I can't get the gui to load. There are no errors in the code, but GUI won't load to test. I instantiated a person...
  19. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    I have a JPanel called addPanel, which is where new contact can be added to list. Given that each contact can have multiple emails, phone numbers, and addresses...how can I allow the user to enter...
  20. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    Yes. We are not supposed to use either imports. So, should "ArrayListX" be renamed, for example, AddressBook?
  21. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    Clearly I don't know what I'm doing because nobody understands what I'm trying to explain. The example give by our professor had a List interface:

    public interface List <T>
    {
    //append
    public...
  22. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    It can, as far as I can tell...it's a generic type. I was going to give it the type Contact (ArrayListC<Contact> contacts = new ArrayListC<>(); ). I've never used arraylist before and I'm trying to...
  23. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    "You are to design a Java application using the list data structure to manage your contact information. Each contact may have the following data:
    name
    addresses
    e-mails
    phones
    group
    Each...
  24. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    Originally I had the class named differently until I spoke with someone that said I should name it ArrayList.
  25. Replies
    25
    Views
    197

    Re: Searching ArrayList For Specific Object

    Gladly. I'd like to add that I am a little confused as to how I should code the program so that each contain can have 'x' number of emails, addresses, and phone numbers. Not sure I've coded for this...
Results 1 to 25 of 81
Page 1 of 4 1 2 3 4