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

  Inheritance and output formatting

Inheritance and Output Formatting, finish the implementation of class name and derived classes person and employee in the following code. Format the output neatly using setw() and or other setioflags features

  Write a program for a college''s admissions office

Write a program for a college's admissions office. Create variables that store a numeric high school grade point average andan admission test score.Print the message "Accept" if the studenthas any of the following:

  Definition of two queues

Write a code in C language for the definition of two queues, one to hold the process in ready state and one to hold the process in waiting state.

  The authors of the book do a very thorough job explaining

the authors of the book do a very thorough job explaining simpletons operation and encourage you to take a look at what

  Functions to make a main program

write the required functions to make a main program that is already written

  Write a class dataset

Write a class DataSet that computes the largest and smallest values in a sequence of numbers.

  Develop an application for the game of memory

Use object-oriented programming to develop an application for the game of memory. Memory consists of a 20 × 20 grid of face down cards where there is at most one pair of each card in the grid. The types of cards that are available in this versi..

  Write a program to convert between rectangular

Write a program to convert between rectangular and cylindrical coordinates, based upon user input. For example, if the user wants to convert cylindrical to rectangular coordinates, the user would input r, ?, z values and the program would output x, y..

  Write a function to compute the volume of a cone

write a function to compute the volume of a cone by using the base radius r and the height h of the cone as the parameters of the function Vcone = xr^2h/3

  Program to play lottery

The program randomly generates a Lottery of a three-digit number ( any number from 100 to 999), prompts the user to enter a three-digit number, and determines whether the user wins according to the subsequent rule:

  Create codes for the following problem compile and test run

Create codes for the following problem/s. Compile, test run, and edit them if necessary. Include your original .cpp and related file(s) (if any) in a single folder. Name the folder CIS110_Module_4. Compress (zip) the folder and submit the sing..

  Uses classes with linked list

Turning a work in C++ that uses classes with a linked list to a no classes project

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