General assignment hints
How to make multiple versions of your fifth assignment:
Version 1: Learning about the basics of modular design (functions and
procedures). Since I've outlined in the assignment description the specific
functions and procedures that you must implement you won't have spend a great of
time planning out how to break things down but you do have to get very familiar
with the details of how to define and execute the code for these modules.
Your first version could simply be a "skeleton" of all the modules in your
program, meaning that all your functions and procedures will be listed but there
will be statements in the body of each module save for some output messages so
you know when a particular module is being run. You can implement the code
for the modules in successive versions, the idea for the first version is to
determine EXACTLY what you need to create a compilable program that uses and
calls functions and procedures. Also for this version I would write
modules that take no parameters because you can always rewrite your function and
procedure definitions later. The first version of your program could look
something like this.
Once you have a compilable and working version back it up and DO NOT touch the
backup. Only make your modifications on the copy so that you will
always have at least a partially working version if disaster strikes and you
have insurmountable logic errors in later versions that you just can't figure
out before the assignment deadline.
Version 2: Learning about parameter passing. You can write your solution as a simpler version of the assignment, e.g., it tracks the employee of only one employee, it's admittedly a useless program but it's purpose is not for you to commercialize and sell the code but to teach yourself the more advanced concepts of modular design such as parameter passing. In this version you'll likely only implement three modules: a) One to initialize the employee's salary to a starting value b) One to allow the user to input a value for the employee's salary 3) One to display the salary onscreen. With this version of the program, instead of declaring an array of salaries for multiple employees (as described in the assignment) you should declare only a single real number variable in the main procedure and learn how to pass it as a both a value and variable parameter. The second version of your program could look like this.
Again: Once you have a compilable and working version back it up and DO NOT touch the backup.
Version 3: Implementing some of the required functionality of the assignment program without using an array. In this version of your program you can actually try to implement some of the code for the remaining functions and procedures. You can do this by declaring three variables that are real numbers and passing these variables into each module as I do in this partial example (since we are now talking about how to write the code that you actually have to write for your assignment you didn't expect me to show you all the answers did you? ☺) This will allow to work figure the logic of some assignment even before you learn about the syntax of how to use an array. Once you get this version working it should be a fairly easy to replace the three real variables with a single array of real number elements and to make a few slight changes to your modules so that they manipulate a single array rather than three separate variables. Note: This version (which uses multiple declarations of real variables) is NOT the way you should implement your final version. However doing it in this incorrect way first will give you a much better appreciation for why arrays are so useful...
1 In case skeptical about how true my statements are because you have worked out a few numbers and are wondering how I ended from starting out as a first year student to graduate student to full time faculty member so quickly, I finished my undergrad degree in a little over two years and was hired to work full time while I was still a full-time grad student.