Currency Converter - Exercise 4 pg 278:
You will create an application that converts US dollars into foreign currency amounts.
Start a new program. Name form and project with descriptive names. You will want to create a form that looks similar to the one below:
You will create an application that converts US dollars into foreign currency amounts.
Start a new program. Name form and project with descriptive names. You will want to create a form that looks similar to the one below:
1. Use www.XE.com to acquire conversion rates.
2. Convert Russian Rubles, Japanese Yen, Canadian Dollars, European Euros, and Mexican Pesos. This is different from the instructions in the textbook.
3. Make sure all controls have descriptive names
You will need 1 textbox, 11 labels and 2 buttons.
4. Add Calculate and Exit buttons. Add a Clear by coding the TextChanged property of the dollars textbox to be the clear.
5. Check answers for accuracy.
6. Make sure tabs work in correct order.
7. Display Canadian Dollars and Pesos as currency.
You will need to use the concatenation symbol (&) to do steps 8 - 10 and your number pad. If your number pad is not working, press the clear button.
8. Put the Euro symbol ( use alt + 0128) BEFORE the amount.
me.xEuroLabel.text = " €" & euro.ToString ("N2")
9. Add the Yen symbol (use alt + 157) BEFORE the amount.
10. Put RUB after the Rubles ( there is no symbol)
12. Include your name, and description of the application. The description should be a sentence.
13. Turn in your rubric, code and 2 pieces of test data.
14. The test data are 100 US Dollars and 231 US Dollars.
15. Set the default button to Convert. This is done by setting the AcceptButton property of the form. Also set the start position of the form so that it is centered on the screen.
An example of the test data is below:
NOTE THE CONVERSION RATES ARE NOT UP TO DATE! YOUR NUMBERS WILL BE DIFFERENT!
HINTS: You may want to use the following variables
'Declares the variables
Dim US As Decimal
Dim Ruble As Decimal
Dim Yen As Decimal
Dim Canada As Decimal
Dim Euro As Decimal
Dim Peso As Decimal
'Gets the users dollar amount to convert
Decimal.TryParse(Me.xUSTextBox.Text, US)
'calculate each currency ( do this for EACH of the 5)
Ruble = US * 33.7293D
'Display the amount in each corresponding label ( Do this for EACH of the 5)
'Declares the variables
Dim US As Decimal
Dim Ruble As Decimal
Dim Yen As Decimal
Dim Canada As Decimal
Dim Euro As Decimal
Dim Peso As Decimal
'Gets the users dollar amount to convert
Decimal.TryParse(Me.xUSTextBox.Text, US)
'calculate each currency ( do this for EACH of the 5)
Ruble = US * 33.7293D
'Display the amount in each corresponding label ( Do this for EACH of the 5)