/****************************************************************************** * This program computes the combined FICA taxes with formatted output. * The gross pay is supplied on the command line. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ import org.pureprogrammer.Utils; public class CombinedFICATaxCmdLine { static final double FICA_RATE = 0.0765; public static void main(String[] args) { double grossPay = Utils.stodWithDefault(args[0], 0); double ficaTax = grossPay * FICA_RATE; double netPay = grossPay - ficaTax; System.out.println(Utils.format("Gross Pay: {0:.2f}", grossPay)); System.out.println(Utils.format("FICA Tax: {0:.2f}", ficaTax)); System.out.println(Utils.format("Net Pay: {0:.2f}", netPay)); } }