Calculate the taxable income-subtract the sum

Assignment Help Basic Computer Science
Reference no: EM131289215

Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan.

The tax rates are as follows: If the taxable income is:

  • Between $0 and $15,000, the tax rate is 15%.
  • Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000.
  • Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000.

Prompt the user to enter the following information:

  • Marital status
  • If the marital status is ‘‘married,'' ask for the number of children under the age of 14
  • Gross salary (If the marital status is ‘‘married'' and both spouses have income, enter the combined salary.)
  • Percentage of gross income contributed to a pension fund

Your program must consist of at least the following functions:

a. Function getData: This function asks the user to enter the relevant data.

b. Function taxAmount: This function computes and returns the tax owed. To calculate the taxable income, subtract the sum of the standard exemption, the amount contributed to a pension plan, and the personal exemption, which is $1,500 per person. (Note that if a married couple has two children under the age of 14, then the personal exemption is $1,500 * 4 = $6,000.)

Reference no: EM131289215

Questions Cloud

Provide an overall background of the topic : Provide an overall background of the topic. Include any comparison or contrast of additional System Analysis and Design concepts or technologies that we have discussed in the course or that you have read about.
Determine strategies that can be used to develop effective : Determine strategies that can be used to develop effective groups and teams.Describe methods that can be used to facilitate phases of team development.
Should the company be liquidated or reorganized : What are the advantages and disadvantages of a voluntary workout to resolve financial distress? What are the advantages and disadvantages of declaring bankruptcy to resolve financial distress?
Difference between economic failure and financial distress : What is the difference between economic failure and financial distress? Which situation is likely to lead to liquidation, and which is likely to result in reorganization?
Calculate the taxable income-subtract the sum : Function taxAmount: This function computes and returns the tax owed. To calculate the taxable income, subtract the sum of the standard exemption, the amount contributed to a pension plan, and the personal exemption, which is $1,500 per person. (No..
What is the purpose of a prepackaged bankruptcy : What is the purpose of a prepackaged bankruptcy? Would a prepackaged bankruptcy be more likely to be used for a liquidation or a reorganization?
Explain the planning consideration for staffing organization : Develop a model for staffing an organization that supports the firm's Human Resources Management strategy and sustains productive operations.
Global variables and special values : Your program should not use any global variables and special values such as coffee cup sizes and cost of a coffee cup must be declared as named constants.
How to manage change and reorganisation lawfully : Understand the purpose of employment regulation and the way it is enforced in practice. how to manage recruitment and selection activities lawfully.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Digital camera specifications for mobile devices

Research the latest digital camera specifications for mobile devices. Compare the highest-quality mobile device cameras to digital cameras available on the market. Choose one mobile device that has a scanner and answer the following questions:

  Allocating caller-save and calleesave registers carefully

By allocating caller-save and calleesave registers carefully, fewer registers may need to be saved across a call. Extend the seven steps of Section 13.2.1 to provide for saving and restoring of both caller-save and callee-save registers.

  Identify the population-the units

In each of the following situations, identify the population, the units, each variable, and tell if the variable is categorical or quantitative. If it is quantitative, then identify it further as either discrete or continuous.

  Principles of logical design

Explain the principles of logical design. Discuss the strengths and weaknesses of various network designs. Demonstrate an understanding of network design by presenting their own designs and share and promote own design by means of written communic..

  What is a blob and clob

List some factors that can cause large variations in the number of people trying to access a Web site simultaneously.

  Create a class that simulates an alarm clock

create a class that simulates an alarm clock. In this class you should *store time in hours, minutes, and seconds. Note if time is am or pm. (hint: you should have separate private members for the alarm and the clock.

  What are its propagation delay and contamination delay

Redesign the circuit from Exercise 2.35 to be as fast as possible. Use only the gates from Table 2.8. Sketch the new circuit and indicate the critical path. What are its propagation delay and contamination delay?

  Appropriate data structure for representing numbers

Your first task will be to come up with an appropriate data structure for representing numbers of arbitrary potential length in base 215. You will have to deal with large negative numbers also

  What is a peer-to-peer network

Explain what is a peer-to-peer network and the advantages and disadvantages a peer-to-peer network has over server based networks.

  Is the process before and after the swap are the same

Is the Process before and after the swap are the same? Give reason.

  Memory allocation errors

The application should display all daily. Use a user-defined function as handler of memory allocation errors. The user-defined function should be registered as a default handler of new failures temperatures as well as average weekly temperatures in a..

  What is the maximum frequency counter can operate reliably

What is the maximum frequency the counter can operate reliably?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd