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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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