Question: + set 4 0 1 k ( ) : static double 1 . Prompt 5 . 2 . Returns the 4 0 1 k contribution

+set401k(): static double 1. Prompt 5.2. Returns the 401k contribution as a percentage of salary by calling validateDecimals() and sending it input.hasNextDouble() as the first argument and the second argument. +test401k(): static double 1. Prints message. 2. Returns the 401k contribution as a percentage of salary by calling validateDecimals() and sending it input.hasNextDouble() as the first argument and the second argument. +formatDollarSign(employeeName: String, grossPay: double, empl401k: double): static String 1. Receives the employee name, the gross pay, and the 401k contribution amount. 2. Returns the formatted String with a dollar sign that is added to the payroll expense report. String.format("%n%-30s %8s $%,15.2f %8s $%,13.2f", employeeName, "", grossPay, "", empl401k);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!