COMP 114



COMP 114

Spring 2005

Continuing payroll assignment: part 3

Due: March 24, 2005

Do part 1 first, then part 2. Part of the experience is to see how easy (or hard) it is to implement the second part given the way you did the first.

Part 1. Add to your payroll program a Federal tax calculator. For simplicity, assume that Federal tax is a flat 20% of salary[1]. The “paychecks” you generate now should show name, gross salary, Federal tax, and net salary.

Think about where the Federal tax should be calculated. Hint: might Federal tax ever change? Think about how information should be communicated with the Federal tax calculator. We’ll discuss push vs. pull in recitation on 4th.

Part 2. Change the Federal tax calculation so that it is 20% of salary minus $20 for each dependant. So, for example, if Joe earned $500 this week (by whatever way he earns salary) and he has 3 dependants, his Federal tax would be $100 – 3*$20 == $40. Federal tax (unfortunately) cannot go below zero no matter how many kids you have.

-----------------------

[1] I wish!

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches