Posted on Wednesday December 03, 2008 by Bellanov Apilli
While continuing on the test driver and implementing each method's respective switch statement, the problem I've come across relates to the passing of parameters. Take the following case:
case 1:{
addItem(item);
break;
}
It simply invokes the addItem method, sending the parameter "item". As you've instructed, this parameter should go in the method declaration, which brought about another question.
In my mind, the proposed method declaration would be as follows:
addItem(int a, int item1, int item2, int item3, ... )
Yes, it is fine to have those many parameters to the test method. Kunal suggested that it should be fine.
ReplyDelete