Page 1035 - SUBSEC October 2017_Neat
P. 1035

Problem-Solving
               1.      Develop an algorithm to print the names of the candidates who should receive a refund.  A
                       refund is due if the candidate’s votes received equals or exceeds 20 per cent of the votes cast
                       in the constituency. The algorithm should also determine and print the number of candidates
                       who received a refund. Test the algorithm with data from ten candidates. The algorithm must
                       accept  as  input  the  names  of  the  candidates,  votes  received  and  the  votes  cast  in  the
                       constituency.  The algorithm should print the name of the candidate and the words “Refund
                       Due” or “No Refund” and the number of candidates who received a refund.  Data to test the
                       algorithm must be sourced from the spreadsheet section of the project.

               2.      Design and execute a trace table to test the algorithm developed in question (1) above. The
                       table should have a maximum of ten iterations.

               Program Implementation
               1.      (a)  Develop a problem statement for the algorithm developed in question (1) above.

                       (b)  Using the programming language Pascal or VBA, write code to implement/automate the
                          algorithm in question (1) above.
























































                                  CXC 30/G/SYLL 17           58
   1030   1031   1032   1033   1034   1035   1036   1037   1038   1039   1040