[Bluej-discuss] Blue j object wth java exercise 4.30

Marko Bajic mbnov26 at hotmail.com
Sun Apr 16 04:20:20 BST 2006


Hi my name is Marko.
i have finished exercise 4.30 of Blue J Objects with java but I am wondering 
if there is a better solution to the problem. This is what I have:

public int joinedInMonth(int month)
    {
       int count = 0;
        if(month < 1 || month > 12){
        System.out.println("Not a valid month");
      Iterator it = members.iterator();
        while(it.hasNext()); {
            Membership variable = (Membership) it.next();
        if (variable.getMonth() == month){
        count++;
    }

    }}return count;}

thankyou
Marko

_________________________________________________________________
realestate.com.au: the biggest address in property  
http://ninemsn.realestate.com.au



More information about the bluej-discuss mailing list