Is122 Solution: A) B) Form: Frmweather Label: Lbltemperature
Is122 Solution: A) B) Form: Frmweather Label: Lbltemperature
Is122 Solution: A) B) Form: Frmweather Label: Lbltemperature
11) Figure 2 shows a possible the user interface for the weather reporter program.
c) Textbox: txtTemperature
Radio button: radSuva
h)
Checkbox: chkRain
f)
Label: lblMessage
e)
Figure 2: Weather reporter program UI
i. Name the controls indicated by labels a) – h) in Figure 2. (use the spaces provided in Figure
2)
ii. The program prints the message indicated by e) upon selection of one of the city options.
Write the Visual Basic code that uses the temperature and humidity inputs and prints the
message in the required format indicated by e). (You can give appropriate names for the
controls to use in your code)
12) Consider the information in table 1 that shows the shipping cost based on the total frame area.
Table 1: Shipping cost ($)
Total frame area (square inches) Shipping Cost ($)
< 50 2
50 – 80 4 + 0.10 per sq inch > 50
81-100 6 + 0.10 per sq inch > 88
>= 101 10 + 0.10 per sq inch > 100
The total frame area is simply the dot product of the length and width of the frame. Assume
total frame area is already calculated and stored in an integer variable called
intTotalFrameArea. Answer the following questions:
i. Declare a variable with an appropriate type and name to store the shipping cost. (2 marks)