*** Visual Studio in some lab computers is not working well for some students. Try these instructions created by the McIntire helpdesk. If VS still fails to load correctly, contact the McIntire Help Desk in person, at 434.924.7988, or helpdesk@comm.virginia.edu and let them know.
Homework H03
A Simple Financial Calculator
Goal
Begin coding some simple programming elements
Task
Implement the Simple Financial Calculator described by means of the UML Activity Diagram in the lecture slides and the vLab. Use
Visual Studio and VBA.
Assume a non-malicious user, i.e., somebody that may make data entry errors, but is not trying to break it maliciously.
Criteria
- REQUIREMENT: your app accepts in input the principal without the "$", years as integers, and interest rate as a percentage.
E.g., if the interest rate is 0.0475, enter 4.75. - REQUIREMENT: Your system must look like the picture above. Microsoft sometimes changes their color palettes. Ok if the colors are close.
- REQUIREMENT: format your output professionally. For example: 12350.6543467771 is not formatted well. By contrast, $12,350.65 is
- REQUIREMENT: the program must run as described in the UML diagram. In particular, pay attention to the acceptable values for the user entries. Assume that 'years' is an integer with no decimals.
- REQUIREMENT: functionality must be achieved via code, not Excel formulas in the cells of the spreadsheet. The goal of this exercise is to get you started with variables and conditional tests.
NOTES:
Microsoft has changed the definition of their Styles. In the video I am using Style 5. For the homework, pick a style that
resemble closely the picture above.
Hints and Tips
- Listen to the comments in the video, not just look at it.
- It is OK to use newer versions of Excel if you have them.
- Sometimes the vLabs leave some part for you to complete, and sometimes the homework text has additional or different requirements. This is to force you to think on your own. Do not follow the vLab blindly!
- There are very many ways to do H3. Your own coding style may be just as good as what you see in the vLab, or even better. The most important requirement is that your app works and satisfies the requirements, not that the code looks like the vLab.
- Sometimes you might be asked to follow the example very closely, and sometimes you will be given some freedom to follow your creativity. For this homework, you may take some liberty in the captions of the button and the dialogues with your calculator. Feel free to have some fun and give it a personality! Make it grumpy, or superapologetic, or supernice.... anything you like!
- This vLab will take much longer than the previous two. Give yourself plenty of time.