Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i dont understand what additional information is being requested. please draw the control flow graph for the indicated program. ok The following program has been

image text in transcribed
i dont understand what additional information is being requested.
please draw the control flow graph for the indicated program.
ok
The following program has been implemented for a newly proposed tax calculation formula for residents fictitious country. // incomelist[]; the array recording the individual income items I childL ist[]: the array recording the ages of children supported by this person // parentList[] the array recording the ages of parents supported by this person. I public double computeTax(double[] incomelist, int[] parentl ist, int[] childl ist) f 2 double tax Amount =0.0; 3 double incomeAmount =0.0; I/ calculate the income amount 4 for (int i=0;i400008 \&. incomeAmount 80000&& incomeAmount c=120000 ) \& 12 taxAmount =800+2800+ incomeAmount 0.12; 13 ) clse if (incomeAmount >120000 ) \& 14 taxAmount =800+2800+4800+ incomeAmount 0.17; 15) // calculate the tax exemption from having children 16 int taxExemption =0; 17 int numOfChild = childL List.length; 18 while (numOfChild >0 ) i 19 if (child ist[numOrChild 1]60 ) \& 27 tax.Amount = tax Amount 2000; 28 taxExemption = taxlixemption +2000;29 30 ) // the maximum tax exemption is 8000 each person 31 if (taxExemption 0 ) \& 33 return taxAmount; 34 ) else : // i.e., taxAmount 8000 38 taxAmount = tax.Amount +( taxExemption 8000) : 39 return taxAmount; 40} 41) Your Tasks Draw the control flow graph for this program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

d. How were you expected to contribute to family life?

Answered: 1 week ago