Question: Following is a complete code that I did: Public class Main { public static void main ( String [ ] args ) { int hours
Following is a complete code that I did:
Public class Main
public static void main String args
int hours ;
double grossPay, payRate ;
double fedTaxRate fedTax;
double stateTaxRate stateTax, netPay;
grossPay hours payRate;
fedTax fedTaxRate grossPay;
stateTax stateTaxRate grossPay;
netPay grossPay fedTax stateTax;
System.out.printlnGross pay $ grossPay
Federal tax $ fedTax
State tax $ stateTax
Net pay $ netPay;
Assignment a
Rewrite the above problem with its full code and include four additional methods
called, getGrossPay, getFedTax, getStateTax and getNetPay.
Pass the variables, hours and payrate from main method to each
of the four methods, compute values and return them back to the
main method to print values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
