| HW0 (computers often start counting at zero ;-) ) |
To submit the following HW, zip up the entire project folder and submit it to HW0 folder on the Lessons tab in Angel Re-create the HelloWorldAgain project. We started this in class. Finish it for HW. |
|---|---|
| HW1 Due: Thursday Feb 1, 2007 |
To submit the following HW, zip up the entire project folder and submit it to HW1 folder on the Lessons tab in Angel Formulas For Area and Circumference of a Circle
Given a circle with radius, r:
The Assignment
Create a program that asks the user to enter the radius of a circle. The program should then display the area and circumference of the circle. You may use the value of 3.14 as an approximate value of pi. |
| HW2 Due: T Feb 6, 2007 |
To submit the following HW, zip up the entire project folder and submit it to HW1 folder on the Lessons tab in Angel Create a program that allows the user to enter numbers into 3 different text boxes. When the user presses a button, the values in the textboxes should change as follows:
HINT: You will need to use at least one variable. For example if the following were the original values
After pressing the button once, the values should be changed to appear as follows:
After pressing the button a second time, the values should be changed to appear as follows:
etc ... |
| HW3 Due: T Feb 19, 2007 |
To submit the following HW, zip up the entire project folder and submit it to Angel CREATING THE VB PROJECT
The purpose of this assignment is for you to get used to entering code with nested if/elseif/else statements. Create a new VB project with the following interface:
The user of the program enters a number and presses the button. A series of different MessageBoxes will then be displayed. The contents of the message boxes depend on what number the user entered. The code for the button's click handler can be seen by cliking here. The name of the button in the project is btnDoit and the name of the textbox is tbNum. IMPORTANT: When you type in the code, make SURE that you press ENTER after each time that you type the words THEN and ELSE. If you don't then VB will format the code in a different way than we learned about. QUESTIONS
What messages boxes will be displayed when the user enters the following numbers?
Make sure that you are able to figure out the answers by just looking at the code. To check your answers you may try running the program and see what you get. |
Due: W March 14, 2007 |
Answer the following question. You do NOT have to submit the answer to Angel. Question: Given the following code, what will the program display when the user clicks "Button1" ?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim s As String
Dim i, j As Integer
j = 3
For i = 2 To 4
j = j + i * 2
s = j.ToString() & j.ToString() & s
MessageBox.Show(s)
Next i
End Sub
|
Due: M March 19, 2007 |
Answer the following question. You do NOT have to submit the answer to Angel. Write a program that asks the user to enter a number. The program should then compute the sum of "N + N/(N+1)" where N loops from 1 through the number that the user entered. For example, if the user enters the number 4 then the program should compute the following value and display the result (i.e. 12.716666): (1 + 1/2) + (2 + 2/3) + (3 + 3/4) + (4 + 4/5) |
Due: M March 19, 2007 |
Answer the following question. You do NOT have to submit the answer to Angel. Write a program that asks the user for a number. The program should then draw a vertical line of as many X's as the user specified. For example, if the user enters 4, the program should draw a vertical line of 4 X's: X |