Assignment 2
Due May 21 at the start of class
Create a program that performs two different calculations.
-
Translate Temperature
- Your form should have a labeled text box for entering the temperature.
- Your form should include two option buttons (radio buttons): one for
changing Celsius to Fahrenheit and the other for changing Fahrenheit to
Celsius. Place these buttons within a frame so that they form a group.
- Your form should include a button to calulate the new temperature.
If neither option button is selected, then print an appropriate message
in a label on the form. If either of the option buttons is selected then
perform the appropriate calculation and place the result in a label on the
form. Be sure to echo the input when you diplay the result.
- C=5/9(F-32)
-
Calculate measurements for a circle
- Your form should include a labeled text box for entering the radius of
a circle.
- Your form should include three check boxes: one for circumference, one
for area, and one for diameter. Place these buttons within a frame so that
they form a group.
- Your form should include a button to calculate the checked measurements.
For each one that is checked, calculate the
appropriate measurement and display them in a label on the form. If none of
them are checked then display an appropriate error message in a label on the
form.
General Requirements
- Choose a background color for the form.
- Choose a different background color for everything else except the text boxes.
Leave the text boxes as white. Change the style of the buttons to graphical to
make them transparent.
- Choose a 12 point font.
- Draw a rectangle around each of the calculation areas. (You may use a frame
in VB.NET)
- Include an Exit button
- To hand in the assignment
-
Zip the entire project and upload it via the web.
-
Hand in a printout of your .frm file for your form. Do not print this from within VB.
Open the file in Notepad and print it from there. (If you are using .NET, print out the .vb file)
-
Here is a screen shot of how my project looks:
hw2