Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91379993
  • Price:- $50

Guranteed 36 Hours Delivery, In Price:- $50

Have any Question?


Related Questions in C/C++

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As