Untitled
unknown
plain_text
a year ago
1.5 kB
6
Indexable
Never
/* * NetPay.java * Author: Dylan Patel * Statement of Academic Honesty: * * The following code represents my own work. I have neither * received nor given inappropriate assistance. I have not copied * or modified code from anywhere other than the authorized * sources. I recognize that any unauthorized sharing, assistance, * or plagiarism will be handled in accordance with both the * University of Georgia's Academic Honesty Policy and the * policies of this course. I recognize that my work is based on * an assignment created by the School of Computing * at the University of Georgia. Any publishing or posting * of source code at any time for this project is prohibited. */ import java.util.Scanner; public class NetPay { public static void main(String[] args) { //constants double FEDERAL_TAX_PERCENT = 10.0; double STATE_TAX_PERCENT = 4.5; double SOCIAL_SECURITY_PERCENT = 6.2; double MEDICARE_PERCENT = 1.45; double PAY_PER_HOUR = 7.25; //input Scanner hours = new Scanner(System.in); System.out.print("Hours per week:"); double hoursperw = hours.nextDouble(); //calculations double grosspay = PAY_PER_HOUR * hoursperw; double netpay = grosspay - (FEDERAL_TAX_PERCENT + SOCIAL_SECURITY_PERCENT + MEDICARE_PERCENT); double federal = FEDERAL_TAX_PERCENT/100; double state = STATE_TAX_PERCENT/100; double social = SOCIAL_SECURITY_PERCENT/100; double medicare = MEDICARE_PERCENT/100; System.out.print("Hours per week: \t" + hoursperw); } }