Question

Write a Java program that calculates and prints the monthly pay for an employee. The net...

Write a Java program that calculates and prints the monthly pay for an employee. The net pay is calculated after taking the following deductions:

Withholding Tax 10%

SSS Contribution 2.50%

Medicare 1.30%

PensionPlan PHP 200.00

Homework Answers

Answer #1

Code:

import java.util.Scanner;
class Main
{
        public static void main(String arg[])   
        {
            double gross_sal, witholding_tax, sss_contribution, medicare ,pag_ibig_php = 200, netSalary;
            Scanner sc=new Scanner(System.in);
            System.out.println("Enter Gross salary");
        gross_sal=sc.nextDouble();
        witholding_tax = 0.1*gross_sal;
        sss_contribution = 0.025*gross_sal;
        medicare = 0.013*gross_sal;
            netSalary = gross_sal- witholding_tax - sss_contribution - medicare - pag_ibig_php;
            System.out.println("Net Salary is=" + netSalary);
    }
}

Output:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a program that takes the income of an employee and calculates the corresponding net income...
Write a program that takes the income of an employee and calculates the corresponding net income and tax portion based on the following information: (in C++) tax = 40%: income > =100,000 $ tax=30%: 80K<=income<100K tax=20%: 60K<=income<80K tax=10%: 40K<=income<60K tax = 0%: income <40 K
Question 2: write a java program    A Hypermarket makes an offer for its customers according...
Question 2: write a java program    A Hypermarket makes an offer for its customers according to the number of items to be bought as follows: Number of purchased items Discount percentage Less than 25 2.5% 25 – 50 5.0% 51 – 100 6.25% Greater than 100 7.5% The hypermarket also adds 2% city taxes to the purchases after the sale discount. Reads from the user the number of items to be purchased and the item price. Calculates and prints...
A Cable Company has hired you to write a C++ program that calculates the monthly bill...
A Cable Company has hired you to write a C++ program that calculates the monthly bill for their customers. It must meet the following specifications: The program must first greet the customer. The program must then ask for their name, the number of basic channels packages they’re subscribed to, then the number of premium channel packages they’re subscribed to. The bill is calculated as follows: There is a $75 base fee. The first 3 basic channels packages are free, after...
C++ Write a program that calculates and prints the total grade for n assignments as a...
C++ Write a program that calculates and prints the total grade for n assignments as a percentage. Prompt the user to enter the value of n, followed by the number of points received and number of points possible for each assignment . Calculate and print the total number of points received, total number of points possible, and the overall percentage: (total points received / total points possible) * 100. Output: Enter·number·of·assignments·to·input:3↵ Enter·number·of·points·received·for·assignment·1 :10↵ Enter·number·of·possible·points·for·assignment·1 :10↵ Enter·number·of·points·received·for·assignment·2 :7↵ Enter·number·of·possible·points·for·assignment·2 :12↵ Enter·number·of·points·received·for·assignment·3...
An employer has one employee who earned $3,000 his first month of employment. The employee’s federal...
An employer has one employee who earned $3,000 his first month of employment. The employee’s federal income tax withholding (FITW) is $400, and the employee has voluntary monthly deductions of $125 for health insurance and $25 for union dues. The FICA tax rate for Social Security is 6.2% and the FICA tax rate for Medicare is 1.45%. The employer's FUTA tax rate is 0.6% and the SUTA tax rate is 5.4%. (Note: The limit for FICA Social Security is $128,400...
Write a Java program that reads employee information from the file “employee.txt” then the program will...
Write a Java program that reads employee information from the file “employee.txt” then the program will display his/her information on the screen. The file contains the Employee’s Name, age,join date, quit date, and salary. • For each year the employee is in the company,10 days of sick leave are allowed. So, if an employee is in the company for two years, 20 days of sick leave are allowed. • For each year the employee is in the company, one-month salary...
Employee Net Pay Kenneth McFarland's weekly gross earnings for the week ending December 18 were $2,960,...
Employee Net Pay Kenneth McFarland's weekly gross earnings for the week ending December 18 were $2,960, and his federal income tax withholding was $621.6. Assuming the social security rate is 6% and Medicare is 1.5% of all earnings, what is McFarland's net pay? If required, round your answer to two decimal places. $
The payroll records of Speedy Software show the following information about Marsha Gottschalk, an employee, for...
The payroll records of Speedy Software show the following information about Marsha Gottschalk, an employee, for the weekly pay period ending September 30. Gottschalk is single and claims one allowance. Compute her Social Security tax (6.2%), Medicare tax (1.45%), federal income tax withholding, state income tax (1.0%), and net pay for the current pay period. (Use the withholding table in Exhibit 9A.6) (Round your final answers to 2 decimal places.) total (gross) earning for current pay period: $610 cumulative earnings...
Solve the following using java Write a program that runs three threads, each thread randomizes a...
Solve the following using java Write a program that runs three threads, each thread randomizes a number between 1 and 100. The main thread waits for all the others to finish, calculates the maximum of the numbers, which were randomized, and prints it. Random number 1: 10 Random number 2: 38 Random number 3: 81 Max: 81 Note: You should create 3 threads in adition to the main thread. Also, you can use a single thread class and create 3...
1. An employer has one employee who earned $4,000 his first month of employment. The employee’s...
1. An employer has one employee who earned $4,000 his first month of employment. The employee’s federal income tax withholding (FITW) is $600, and the employee has voluntary monthly deductions of $350 for health insurance and $50 for union dues. The FICA tax rate for Social Security is 6.2% and the FICA tax rate for Medicare is 1.45%. The employer's FUTA tax rate is 0.6% and the SUTA tax rate is 5.4%. (Note: The limit for FICA Social Security is...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT