Alert: Visual Studio in many lab computers is not working well for some students.
The help desk manager has a recommended set of steps if VS does not start, hangs up, or gives error messages:
1) Copy template from S drive (Grazioli\TemplateVSTOWorkbook) to the desktop
2) Launch VS 2022, skip login
3) If VS fails to launch, log out of Windows and back in, then re-launch VS 2022
4) Open the template file in VS 2022
5) If VS 2022 doesn’t appear to be working properly, log out and back in, then try opening the template again
If the program fails to load correctly after two or three attempts, contact the McIntire Help Desk at 434.924.7988 or helpdesk@comm.virginia.edu and let
them know you are trying to launch VS2022 and what computer you are at.
Homework H03
A Simple Financial Calculator
Goal
Begin coding with 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 not trying maliciously to break it.
Do not forget the hints and suggestions at the bottom of this page.
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 rare is 0.0475, enter 4.75 - REQUIREMENT: Your system must look like the picture above. 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.
Hints and Tips
- 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.