1. Suppose that employee salary is up to 4,000 is tax free.Then next 1500 (means 4000+ 1500 )has 10%.That means 4001 to 5500 Has 10% Tax. Next 28,000 Has 22% tax. That means 5501 to 33,500(28,000+5,500) has 22% tax. More then that, means 33,501 has 40% tax.
That means answer should lies between 5,501 to 33,500 class.
2)Two type of test case :
1)Statement coverage (SC) : In this case test case is executed so that every statement are covered atleast once.
2)Decisions Coverage (DC):In this case test case is executed so that all decisions(T/F) are executed atleast once.
In this case we can try through flow chart :
A- B- C- D
Read newspaper-look at TV page-If program interested(Yes)-on TV Watch program
E- F- G
(No)-Continue reading-If puzzle found(yes)-try and complete
H
(No)-Continue reading.
paths to cover all statements Coverage(SC)
i) ABCD
ii) ABEFGH
For decision coverage(DC)
i)ABCD
ii) ABEFGH
iii) ABEFH (Since in second If statement we take the path that says No).This is not necessary to cover in statement coverage.Because already that statement is covered by going through the previous path.
3) check the program loop for minimum test case require to satisfy all the condition on question number 3 and 4.
Aug 29, 2013