ITP 100 Programming Logic and Design Project In this project

ITP 100 Programming Logic and Design Project In this project, you will design a program to perform the following task: Write a program that allows a tax accountant to computes personal income tax. Your program will ask for a filing status (0 for single, 1 for married filing jointly, 2 for married filing separately) and a taxable income. The program will compute the tax. Please use the following chart to find the tax rate to use to compute the tax: (0) Single: o $0 - $33,950 --> 10% o $33,951 - $171,550 --> 25% o $171,551 + --> 33% (1) Married Filing Jointly: o $0 - $67,900 --> 10% o $67,901 - $208,850 --> 25% o $208,850 + --> 33% (2) Married Filing Separately: o $0 - $38,950 --> 10% o $38,951 - $104,425 --> 25% o $104,426 + --> 33% The program should run and allow for as many entries as the tax accountant wants to enter. It will process the personal income tax for each person as well as calculate the average income tax for all the individuals entered. The program will stop when a user enters -1. You will turn in your: inputs outputs pseudocode flowchart desk check. Submission Requirements for Projects: You will submit two files for this project. You will have your Word document, which will have your inputs, outputs, pseudocode, and desk check. You will also submit your Raptor flowchart file.

Solution

//include directives
#include <iostream>
using namespace std;

//main function to trigger the tax calculation
int main()
{
    //declare variables
    bool flag=true;
    int choice,cnt=0;
    double income=0,tax=0,avgtax=0;
  
    //continous loop to calc tax
    do
    {
        tax=0;
        //prompt user for selection
        cout << \"Enter 0 for single, 1 for married filing jointly, 2 for married filing separately: \";
        cin>>choice;
        //prompt for income
        if(choice!=-1)
        {
            cout<<\"Enter taxable income: \";
            cin>>income;
        }
        //calculate tax based on user\'s selction
        switch(choice)
        {
            case -1:flag=false;
                    break;
            case 0: if(income>0 && income<=33950)
                    tax=income*0.01;
                    else if(income>=33951 && income<=171550)
                    tax=income*0.25;
                    else if(income>=171551)
                    tax=income*0.33;
                    break;
            case 1: if(income>0 && income<=67900)
                    tax=income*0.01;
                    else if(income>=67901 && income<=208850)
                    tax=income*0.25;
                    else if(income>=208851)
                    tax=income*0.33;
                    break;
            case 2: if(income>0 && income<=38950)
                    tax=income*0.01;
                    else if(income>=38951 && income<=104425)
                    tax=income*0.25;
                    else if(income>=104426)
                    tax=income*0.33;
                    break;
        }
        //calculate avegae tax
        avgtax+=tax;
        cnt+=1;
        //display tax incuurred
        if(choice!=-1)
        cout<<\"Tax to be paid: \"<<tax<<endl;
    }while(flag);  
    //dispay average tax
   cout<<\"Average tax: \"<<avgtax<<endl;
   return 0;
}

Pseudocode:

ITP 100 Programming Logic and Design Project In this project, you will design a program to perform the following task: Write a program that allows a tax account
ITP 100 Programming Logic and Design Project In this project, you will design a program to perform the following task: Write a program that allows a tax account

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site