I want to create a code that will allow me to calculate bonuses based on the 10 salarys. i need if statements for this, i need to then assign the new value to my other array i have set up called total, and then i need to display that as well.Ive tried everything with my if statements and it just wont accept anything other than doing one for each element which is no good!! I have a test class also.....any ideas? So far my code prints out the salarys in my array...
public class Salary
{
public void calcSalary()
{
int wages[]={50000,40000,30000,20000,10000,60000,35000,46000,23000,19000};
int total[];
total=new int[11];
System.out.printf("\t%s\n","WAGE"); //column headings
//output each array elements value
for (int counter=1; counter < wages.length;counter++)
System.out.printf("%1d%11d\n",counter,wages[counter]);
}
}
HERES MY TESTER
public class SalaryTest
{
public static void main(String []args)
{
Salary pointer1=new Salary();
pointer1.calcSalary();
}
}