Hello i need some help on what to add to the following if statement for the out put to read the value of sum times the actual number of sum:
public class ICMA42
{
/* instance variables */
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;
}
/**
* Sets the value of alpha to the receiver to the value of the argument aAlpha.
*/
public void setAlpha (int aAlpha)
{
this.alpha = aAlpha;
this.sum = alpha + bravo;
}
/**
* Sets the value of alpha to the receiver to the value of the argument aAlpha.
*/
public void setBravo (int aBravo)
{
this.bravo = aBravo;
this.sum = alpha + bravo;
}
/**
* 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);
}
if ((sum >= 1) && (sum <= 10))
{
System.out.println("Sum is " + this.sum);
}
}
}