Homework H05
The Simple Financial Calculator (Part III)
Goal
Learn about Subs and Functions, Loops, and the 'Select' command.
Context
"Your financial calculator II is great!"
"Thank you Boss!"
It is well known that business requirements are often incomplete. When users see a prototype, they often come up with additional requests. This is not an exception.
"I was thinking... Can I have the table of results in a choice of colors? It would look so much better..."
It is extra hours for you, but your Boss seems to like your work, so you answer with the usual "I am on it Boss!"
Task
This homework adds some functionality to your Financial Calculator II, but most importantly it focuses on procedures ("macros" is the old term, "Sub" and "Function" are the new terms). You will also practice the alternative ways to do loops: for... next, and do...while. Finally, you will implement a choice among more than two options, and will use the Select... Case construct. Make a copy of your H04. Make sure that it works as expected. Then modify it according to the following requirements:
Criteria
- Everything from H3 and H4 must work as required
- Include functions to compute the interest and the sum of interest plus principal. Use them throughout the program
- Include a sub to format currency and use it throughout the whole program
- Create an inputBox to ask the user for a color preference (a = red; b= green; everything else = blue) and implement it using Select...Case
Solutions to critical errors