The first report in task 1 had to contain a list of all the paid up members. To compile this list, the expiry date of each member was calculated depending upon the type of membership. Once the expiry date was set, this date was compared to the variable ‘today’ which was assumed to contain today’s date (or in our case the date in which the report is being generated). If the program finds that the expiry is greater or equal to today’s date, then the record will be listed in the output report as this would mean that the member is active.
The second report in task 1 had to contain a list of all the members that are going to expire in the next month and a total payment due if all members renew their membership. At first, the expiry date of each member was calculated with the same method used in report 1. The expiry date contained the due month in which the subscriber must renew his membership. The due month was then compared with the next month and if these were equal this would mean that the member will expire in the next month therefore included in the report. To calculate the next month, we used a variable of type date which was assumed to contain the current month. The next month would then be equal to the current month + 1.
In task 2 the pseudo code for both reports was written. In both reports an array of records was used to store the membership details. The array contained 100 of these records. This created a limitation to our program but could be easily modified to any bigger value which we want. In both reports a FOR loop was used since the maximum number of members is known.
In task 3 question ‘a’, a REPEAT / UNTIL loop was used since the program had to repeatedly check the members one by one until a true