Project: FICA Taxes (Revisited)
The Federal Insurance Contributions Act (FICA) is made up of two items, Social Security and Medicare taxes. For 2020, the Social Security tax rate is 6.2% on the first $137,700 wages paid. The Medicare tax rate is 1.45% on the first $200,000 and 2.35% on wages above $200,000. Write a program that computes the annual taxes for someone who earns an annual salary provided on the command line. Print the annual salary, Social Security tax, Medicare tax and then the final net salary (annual salary minus taxes). Test the program on annual salaries of $60,000, $140,000 and $210,000.
Output
$ javac -Xlint FICA2.java
$ java -ea FICA2 60000
Gross Salary: $60000.00
Social Security Tax: $3720.00
Medicare Tax: $870.00
Net Salary: $55410.00
$ javac -Xlint FICA2.java
$ java -ea FICA2 130000
Gross Salary: $130000.00
Social Security Tax: $7886.40
Medicare Tax: $1885.00
Net Salary: $120228.60
$ javac -Xlint FICA2.java
$ java -ea FICA2 210000
Gross Salary: $210000.00
Social Security Tax: $7886.40
Medicare Tax: $3135.00
Net Salary: $198978.60