public class ICMA42
// instance variables - replace the example below with your own
private int alpha;
private int bravo;
private int sum;
/**
* Constructor for objects of class sum which initialises sum to 0.
*/
public ICMA42()
{
this.alpha = 0;
this.bravo = 0;
this.sum = alpha + bravo;
}
/**
* Sets the value of alpha to the receiver to the value of the argument aAlpha.
*/
public void setAlpha (int aAlpha)
{
this.alpha = aAlpha;
}
/**
* find the sum of the two int type arguments and store the result in a local variable called sum
*/
public void sumArgs()
{
if (sum > 10)
{
System.out.println("Sum is " + this.sum);
}
}
}
Output - cannot find symbol - method setAlpha(int)