Hello everyone,
I�m new to
java and would appreciate any help; I�m trying to put together a program that calculates commission. The program requires me to create a class containing two overloaded methods named computeCommission and three variables. The first method contains two double arguments representing the sales and rate, multiplies them and displays the results. The second method contains a double variable and an int variable representing sales figure and an int commission rate.
This method must divide the commission rate figure by 100.0 before multiplying by the sales figure and displaying the commission . Any and all suggestion would be appreciated.
Jack
public class Commission
{
public static void main(
String[] args)
{
double commRate = 0.07;
double salesFig = 500.00;
int commRate = 7;
}
public static void computeCommission(double salesFig, double commRate)
{
commission = salesFig * commRate;
System.out.println("The commission is: " + commission);
}
public static void computeCommission(double salesFig, int commRate)
{
doubleComm = commission / 100.0
intComm = salesFig / commRate
System.out.println("The commission is: " + doubleComm + intComm)
}
}