Write program to compute federal personal income taxes

Assignment Help C/C++ Programming
Reference no: EM13810038

You are to write a C++ program to compute federal personal income taxes.  The tax owned depends on how much money one makes as well as their filing status.  For our purposes we will use four filing statuses.  These are (1)single filers, (2)married filing jointly, (3)married filing separately, and (4)head of household.

Tax Rate

Single Filers

Married Filing Jointly

Married Filing Separately

Head of Household

10%

Up to $7,550

Up to $15,100

Up to $7,550

Up to $10,750

15%

$7,551-$30,650

$15,101-$61,300

$7,551-$30,650

$10,751-$41,050

25%

$30,651-$74,200

$61,301-$123,700

$30,651-$61,850

$41,051-$106,000

28%

$74,201-$154,800

$123,701-$188,450

$61,851-$94,225

$106,001-$171,650

33%

$154,801-$336,550

$188,451-$336,550

$94,226-$168,275

$171,651-$336,550

35%

$336,551 or more

$336,551 or more

$168,276 or more

$336,551 or more

For each filing status there are six tax rates.  Each rate is applied to a given amount of the taxable income.  For example, for a taxable income of $450,000 for a single filer, $7,550 is taxed at 10%, ($30,650-$7,550) at 15%, ($74,200-$30,650) at 25%, ($154,800-$74,200) at 28%, ($336,550-$154,800) at 33%, and ($450,000-336,550) at 35%.

Variables

Name

Type

Description and edit specifications

statusCode

Int

Status code must be from 1 to 4.  1=single, 2=married filing jointly, 3=married filing separately, 4= head of household, 9 = end processing.

taxableIncome

Float

Taxable income is entered by the user from the keyboard.  The amount must be numeric and not less than $500.

taxAmt

Float

taxAmt is a calculated field and is determined from the supplied tax table as applied to the taxableIncome. 

Your program should be modular, that is small blocks of code.  (Later in the semester when we encounter functions, you will see how handy modular development can be.)  You are to follow these specifications as closely as possible.  You should have code blocks that do the following:

  1. Input status code.  You should use a do/while loop to control the input logic.  You are to keep the user in the loop until the input is correct.  You are to ensure that the status codes are as specified above.
  2.  Input taxable income.  As in step 1, you are to use a do/while loop for this logic.  You are to keep the user in the loop until the input is valid.
  3. Calculate the tax owned as a result of status code and taxable income.  You are to use a switch statement for the appropriate logic for each status code.  You should manually calculate several cases to ensure your program is performing correctly.
  4. Display the results of the calculation step.  You are to output the status code, the string description of the status code, the taxable income, and the total tax amount.  You are to use appropriate formatting of the output.
  5. You main loop should be a while loop that repeat steps 1 through 4 until the user enters a status code of 9 that will terminate the job.

Reference no: EM13810038

Questions Cloud

Scheduling for optimized production technology : Which of the following is one of Dr. Eli Goldratt's rules of production scheduling for optimized production technology?
Determines the access privillege of a derived class : The base class access specifier determines the access privillege of a derived class to its base class
A leadership contingency theory that stresses the leader : A leadership contingency theory that stresses the intelligence and experience of the leader is
What maximum axial stresses arise at section : What maximum axial stresses arise at section a-a due to purely axial loading - what are the reaction forces and moments that occur at section a-a?
Write program to compute federal personal income taxes : You are to write a C++ program to compute federal personal income taxes.  The tax owned depends on how much money one makes as well as their filing status.  For our purposes we will use four filing statuses.  These are (1)single filers, (2)married..
How do social forces play a role in our lives : How do social forces play a role in our lives
Design object of clothing to meet a range of personal needs : Design one object or article of clothing to meet a broad range of personal needs. Include a minimum of five sketches.
Identify any potential problems : Be sure to identify any potential problems that might arise during the meeting, and give suggestions on how they might be handled.
Thinking about diversity and inclusion : Thinking About Diversity and Inclusion

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Value of x after the following code is executed

What will be the value of x after the following code is executed?int x = 20, y = 30;while (y

  Write a program with three functions

Write a program with three functions: upper, lower, and reverse.

  Design your application according to the considerations

Design your application according to the considerations described above.  For example, you must use functions that have the specified signatures, and arrays that have the specified declarations. They are

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Compute for the monthly billing of their customers

An electric company wants to compute for the monthly billing of their customers. the company charges P2.50 per kwh and utility tax of 3% of the current bill shall be added.

  Write a program to find the area of a circle

Write a program to find the area of a circle. The program should use two procedures. The first procedure will print out the program heading and ask the user to enter the radius.

  Calculate the total as well as the average payment

Create a C++ application which will read a file of daily payments, calculate the total as well as the average payment, display the results to the screen and write the results to a file

  Design and implement a class called cheetah

Create a method that calculates the time required to travel between the starting point and stopping point of the line based on a given speed.

  Write a program to print out 30 real random numbers

Write a program to print out 30 Real Random Numbers with specific limitation (e.g. the real random numbers should be the real number between min=11.1 to  max=222.2).

  Write a function that takes an integer array

1. Write a function that takes an integer array and the array's size as parameters. The function will check if the array is sorted. If it is, it will return a 1. If it is not sorted it will return 0. The function should not  sort the array.

  Write code that declares an int array named month

Write code that declares an int array named month with 5 rows and 7 coloumns and initializes every element to -1.

  Write an algorithm to compute the volume of water

Write an algorithm to compute the volume of water in cubic feet, flowing through a pipe of diameter d in feet, with a velocity of v feet per second.

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