posted 17 years ago
I have a situation. I need to create an iteration one that uses a while loop because I don't want to get into the for loop. Basically I have a class called Club. I have an array list that will allow the user to add "members" to the club. I also have methods to return the value of members joined, a method to see how many joined within a month, and one within a year. To actually join "members", a constructor gets it and asks for the name the month and the year. Then that member is joined. However, now I need to create another array: public ArrayList<Membership> purge(int month, int year) that will ask for the month and year. This is where it will "purge" all the users within that month and year, which will remove them. After that, it will return those members to me that are being removed... so I guess this should be right before they actually get removed. So, return, and then remove. Any idea how to do this using a while?