I'm having trouble trying to move all elements right in this queue. For example, I need to place something in between others because it's priority says it's in there, so how would i make space for it...
Type: Posts; User: jkalm
I'm having trouble trying to move all elements right in this queue. For example, I need to place something in between others because it's priority says it's in there, so how would i make space for it...
Ok, ill give it try.. Am i along the right track with what i have though??
I think we have to make it generic and able to work with any kind of object?? Ye its a class exercise.. im just wondering if my enqueue method is on the right track.. "Joining the queue...
Hey,
Im trying to make a Prioity Queue that uses the queue interface and comparable.. The objects will be placed in depending on their priority.. i'm having a bit of trouble with it, probaly...
The contains method is working, I put in a new contains in the test and that one works ok. It's still the last one that fails. We're allowed assume there will always be enough room.. I'm not...
Having some trouble with the addGroup method. Really can't see where it's failing.
This is the code
public boolean addGroup(Vector<Object> objects, int start)
{
for(int i = 0; i <...
I've gotten this so far. I'm not sure if it will just return true no matter what happens though. Also, I'm getting warnings saying Vector is a raw type.
public boolean addGroup(Vector...
thanks, I'll give it a go and get back to you.
Hey thanks for replying again. Do we have to resize the array even though it says "You may assume that the list/array will always be big enough to take the additional objects."? or is it just...
Hey I now have to do: boolean addGroup(Vector objects, int start). Really don't know where to start, never done vectors before.
The description is : – This method adds the elements in the...
Hey thanks a lot. Really helped me out. I added this to the end and all seems ok. I made tests for it and there doesn't seem to be any problems, thanks again.
//Checks if either indexes...
Hey, thanks for replying. I've posted what i have so far. I know the "isSuccessful" isn't changing or anything, just wondering if i'm on the right track. thanks again
public...
Hey, i'm having trouble understanding what to do for the following. I have to do a swap method:
public boolean swap(Object one, Object two)
I'm doing it in Alist, using an array. I'll have...