Skip Navigation
 

Assignments

Assignment 1

New Page 2

Barbados Community College

Division of Computer Studies

COMP 101 Algorithm and Programming Concepts Using C++

Assignment #1: Income Tax Calculator (Part 1)

Prerequisites, Goals and Outcomes

Prerequisites: Students should have the following prerequisite skills.

· IPO Charts: produce a solution to a problem using a IPO chart with either pseudocode or flowcharts used in the processing column.

· C++ input and output: cin, cout, <<, >>

· C++ control structures: if-else

· C++ operators: produce applications that use C++ arithmetic operators

Goals: This assignment is designed to reinforce the student’s ability to design and implement solutions to problems using the sequential and selection control structures.

Outcomes: Students successfully completing this assignment would master the following outcomes.

· Produce an algorithm to solve a problem given the problems specifications.

· Produce programs that use C++ input and formatted output

· Produce programs that use C++ selection

Description

You are required to write a program that calculates the income tax due. You are required to enter the following data:


  • first name
  • last name
  • national registration number
  • gross salary amount
  • extra income amount
  • PAYE paid
  • Number of children
  • Credit Union Savings
  • Amount spent on home improvement
  • Amount spent on retrofitting
  • Amount invested in mutual funds
  • Amount invested in a retirement savings plan

After getting the input values, your program should calculate the taxable income, which is:

taxable income = total income – deductions


Deductions are as follows:

Personal claim

$18,000 (i.e.the first $18,000 is not taxable)

Children

$1000.00 per child up to a max of 2 children

Credit Union Savings

Maximum of $3000.00

Retirement Savings Plans

Maximum of $10,000

Home Improvement

Maximum of $10,000

Retrofittings

Maximum of $3000.00

Mutual  Funds

Maximum of $10,000

The tax due is then calculated as:

25 % on taxable income up to 35,000

40 % on any amount over 35,000

E.g. If the taxable income is $40,000 then the tax due will be:

25% of $35,000 + 40% of $5000

= $8750 + $1600

= $10,350

The tax payable is then calculated by subtracting the PAYE paid from the tax due.

If the difference is less than zero then the person gets a refund otherwise the tax is payable.

The program should display the results in the following format:

Income Tax Calculator:

Name: xxxxxxx xxxxxxxx

Nat Reg.Num.: xxxxxxxxxx

Gross Income: $ xxxxx.xx

Total Deductions: $ xxxxx.xx

Taxable Income: $ xxxxxx.xx

Tax Due: $ xxxxxx.xx

PAYE paid: $ xxxxxx.xx

Tax Payable $ xxxxxx.xx

Submit the following:

1) An algorithm using both pseudocode and flowcharts

2) The well documented and formatted C++ source code in computer readable format.

 
 
« go back|print