Recent content by Smiles1
-
S
Java Updating an index variable in Java
For the life of me, I can't figure out why my program won't update the index variable. I've tried setting the index to 0, and then to -1, and to the size of the arrayList - 1. I'm trying to use the index to get the previous and next flashCard in the arrayList to show up. I have been working on...- Smiles1
- Thread
- Index Java Variable
- Replies: 1
- Forum: Programming and Computer Science
-
S
MHB Using an MVC to delete an element from an arrayList
Still need help! This does not work either. :-( public class FlashCardList { private ArrayList<FlashCard> flashCards; private FlashCard flashCard; private int index; private int position = -1; FlashCardList() { this.flashCards = new ArrayList()...- Smiles1
- Post #2
- Forum: Programming and Computer Science
-
S
MHB Using an MVC to delete an element from an arrayList
PLEASE HELP! How can I delete a flashcard from my ArrayList? My position never updates and it always deletes position 0. Please let me know if you need more code to examine. I've tried trouble shooting this to find the problem but I can't figure out how to fix it. It's bugging me so badly and I...- Smiles1
- Thread
- Delete Element
- Replies: 1
- Forum: Programming and Computer Science
-
S
MHB Binary Search Tree - Sort the same BSTree by name or by weight
This is solved! :-) I transferred all of my data into an ArrayList, reset the tree, and then added the data back into the tree from the ArrayList using whichever criteria.- Smiles1
- Post #2
- Forum: Programming and Computer Science
-
S
MHB Binary Search Tree - Sort the same BSTree by name or by weight
I've tackled a lot so far! I've created methods to delete, get the weight, and sort the tree by name. My goal is to have my switch criteria change how the tree is sorted, either by weight or by name. I haven't figured out how to implement it within my switchCriteria() method, so I've been...- Smiles1
- Thread
- Binary Search Sort Tree Weight
- Replies: 3
- Forum: Programming and Computer Science
-
S
Java Java- CompareTo with Binary Search Tree
THANK YOU! Thank you for the help. :-)- Smiles1
- Post #3
- Forum: Programming and Computer Science
-
S
Java Java- CompareTo with Binary Search Tree
I am having a hard time implementing comparing a given String name with the names of the Dog objects in my binary Search Tree. The problem comes from my containsRecursive() method. I need to use a String name to find if the name is already in my Binary Search Tree.Here's what I've tried...- Smiles1
- Thread
- Binary Java Search Tree
- Replies: 3
- Forum: Programming and Computer Science