Limited access

Upgrade to access all content for this subject

A programmer is asked to create a method that calculates and returns the net salary for an employee’s pay stub. The gross salary, tax rate and other deductions are needed to calculate the net salary.

What would be the most appropriate method header for this method?

A
public static int calcNetSalary(int gross, int taxRate, 
                                int deductions)
B
public static int calcNetSalary(double gross, double taxRate, 
                                double deductions)
C
public static double calcNetSalary(double gross, double taxRate,
                                   double deductions)
D
public static double calcNetSalary(double gross, int taxRate, 
                                   double deductions)
E
public static void calcNetSalary(int gross, int taxRate, 
                                 int deductions)
Select an assignment template