Paul Ryan wrote:As you can see I have the array set to size 100, how do i make so it increments each time the user adds a student.
Paul Ryan wrote:As you can see I have the array set to size 100, how do i make so it increments each time the user adds a student.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Paul Ryan wrote:
So how would I test if the array is full in there? Would I use .equals?
Paul Ryan wrote:Yeah I tried this but it gives me an out of bound exception.
Paul Ryan wrote:
But my problem here is how do I implement this and this isn't really automatic but I think this is what the question is suggesting I do.
Paul Ryan wrote:Ok so the question states that I should improve it to automatically increase the array size by creating a new larger array and copying into the contents into it.
So I did thisBut my problem here is how do I implement this and this isn't really automatic but I think this is what the question is suggesting I do.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Paul Ryan wrote:So bigStudents is called when students can't hold anymore and this is what i did to ensure bigStudents can never be full
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Paul Ryan wrote:I should use students[i].equals(student) and shouldn't use bigStudents here. Is this correct?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
private void, please.Paul Ryan wrote: . . . public void increaseArraySize(int amount)
Paul Ryan wrote:I would really like to get rid of that null value.
Paul Ryan wrote:Thanks for all your help so far Winston. Would this be a better way of increasing the array size essentially giving the user the power to decide how big the array is :
I would really like to get rid of that null value.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|