The bookkeeper has started to get really excited about what the computer can do for the business and for its financial information. He thinks that it might be useful if your payroll program could build a big in-memory table of all of the paychecks written each week. That way, another program could help determine the highest-paid employee or the one who's not had a pay raise in a long time.
You can anticipate that you'll want to write this data out to a file later on, but in order to process it, to make it so it can search or look for specific paychecks, for example, youll need to be able to read it all into memory and hold it in a big table.
As this will be the last activity related to the Programming Corner, be sure to update the documentation in your RAPTOR program, to show when you've modified it and what youve done to it.
The bookkeeper has started to get really excited about what the computer can do for the business, and for its financial information. So what he'd like you to do is to add a way to remember all of the payroll data, and then be able (next week!) to be able to sort it, search it, and perform other to-be-specified (invented?) operations on it.
So to help bound this problem, you ask for some simplifying assumptions. We'll start small, you insist. One pay periods data at a time. And we need an upper bound or a limit on how many paychecks per period we might write. Suppose we set that at 25, since right now we only have nine employees in the company. Plenty of room for growth without having to change the DIMENSION statements in the program... but, to be on the safe side, you might declare a variable with a name like max_payevents_perperiod as a way to keep all of your loop limit checking using the same limit value!
What we'd like to do this week is to modify the program so that after it prompts for the company-wide tax rate data, it prompts for and inputs a maximum of max_payevents_perperiod sets of per-employee / per-paycheck data, validates that data, calculates each check, prints each check, and then keeps all of that data in a set of parallel arrays, each of one dimension. These might be:
You'll probably notice that you can accomplish this by:
Be sure to update the documentation in your RAPTOR program, to show when you've modified it and what youve done to it.