Check out Android mobile development! ADT Plugin | Android Developers
Type: Posts; User: vluong
Check out Android mobile development! ADT Plugin | Android Developers
Good start, so far!
What you need:
- the height of a node
What you have:
- passing in the root as parameter
What you are missing:
... because it is a recursive method, in each method...
The "+" operator is an overloaded operator. This means that you can use it for adding integers an concatenating strings. You cannot use the "-" in the same way to remove characters, unfortunately.
...
Okay, what you have is perfect. Next hint: java substring.
Hi. I understand you are in an intro class, and while your implementation will work for the purpose of this assignment, have you thought about using a separate class to hold all the information for a...
Hi.
You are off to a very good start - let's go with the for-loop. A for-loop consists of three parts: initialization, termination, and incrementation. For example, I choose these three...
Logan, I have tried running your program in my IDE. Here are some remarks:
REMARK 1: You need to invoke printArray(array); in main() -- I see that the main() method in the code you posted is...
Hello JPF.
I am currently trying to implement a 2-3-4 tree for my class. Pseudocodes are provided for the methods that I am to write codes for, but I am still unclear as how to set this up. This...
Hello JPF,
I am trying to implement a hash table, using the methods of double hashing. It seems that I am running an infinite loop. Any suggestions on how I can fix this? Thanks.
private int...
Hello JPF,
I have just been introduced to trees, and for my assignment, I have to build an expression tree. I have the algorithm and idea down, but I'm not exactly sure where to start. So I have...
I'll give that a try!
Hello JPF. I am currently working on a program that builds an expression tree. I am provided with class BinaryTree and I am having trouble constructing a new node.
1) This works:...
Thanks a bunch, literallyjer! It works now!
literallyjer, the "A" are just used for testing and I forgot to change it before posting (it's been changed). I get this error:
Exception in thread "main" java.lang.ClassCastException:...
Hello, JPF. I am trying to implement my own LinkedList and the clone method I have written doesn't seem to work. Can anyone tell me what I did wrong? Thanks!
Okay, this is what I have in my...
Thanks helloworld922 and Json.
The reason why I am trying to write an Editor class with ListIterator is because I am trying to implement a text editor program. I have figured it out for the most...
I need to write a method to undo the preceding step. For example: I'll add "Hello" to the LinkedList and then decide to undo it. My idea is to clone the LinkedList and then if the user calls undo,...
Thank you, Json!
Hello JPF! I have just been introduced to LinkedList and I am working on my first programming assignment, but I am really confused and lost. My professor wants us to implement the program as a user;...
Will try that! I have something very similar set up, but I will make some changes. Thanks.
Thanks for the suggestion. I actually haven't learned hash codes, yet, so I'm still trying to figure this out. I understand that my program won't be very efficient, but right now, I just want to...
I have an array of customers, and I want to keep track of the DVD titles each customer borrowed, so I am guessing that I will create an array for each customer. Can someone help me set it up or...
Your area is of type double, but you are multiplying PI and message (which is a String). There are two things you can do:
1. Change String message into double message, and instead of message =...
So basically, when my program starts, it loads data into an array. I have figured out how to load customer names and numbers by reading from a .txt file and then storing that information into an...