System X: A tax calculator is being developed. As inputs it takes the salary, employment status (employed or self-employed). It is only intended to calculate the tax in cases where the status is “employed”. Individuals have a tax allowance of £11,000, unless they earn more than £120,000 in which case the allowance is reduced by 1 for every 2 they earn over £120,000 to a minimum value of zero. The tax rate on the first £32,000 earned after the allowance is 20% and the rate for earned income over £32,000 more than the allowance is 40%. Earnings over £150,000 are taxed at 45%.
Could you please help me draw a control flow graph (CFG) for System X
Aucun commentaire:
Enregistrer un commentaire