100 likes | 215 Views
MIS 216 Exam1 Review. Spring 2007. What to expect. Questions like those on the home works and on the quizzes Evaluate code Create code Multiple choice and True False on these and terms and concepts Questions from Chapters 1-4
E N D
MIS 216 Exam1 Review Spring 2007
What to expect • Questions like those on the home works and on the quizzes • Evaluate code • Create code • Multiple choice and True False on these and terms and concepts • Questions from Chapters 1-4 • Questions will focus on important concepts and coding statements.
How about some specifics? • What should you focus on? • What are the coding statements we’ve worked on so far? • How do each of these work? • What are they used for? • When would you use one vs. another? • How can I manipulate string values?
Additional specifics • How do those statements appear in Visual studio? • What is the syntax for the statements? • Where do values get stored in textboxes etc? • Where are variables declared? How are they declared?
Variable Level Private frmNewDim intAge as integer intAge=22 Sub btn1 Dim intAge as integer intAge = 176 End Sub Sub btn2 Dim intAge as integer intAge = 822 End Sub Sub btn3 messageBox.show (intAge) End Sub
If and Case Statements Dim sngPurchasePrice as single = 400.95 If (sngPurchasePrice < 100) Then MessageBox.show ("Less Then 100") Else If (sngPurchasePrice < 500) Then MessageBox.show ("Less Then 500") Else If (sngPurchasePrice < 1000) Then MessageBox.show ("Less Then 1000") Else MessageBox.show ("Other Value") End If End If End If
More with If Statements Dim strAnswer1 as string = "YES" Dim strAnswer2 as string = "YES" If (strAnswer1 = "No") Then If (strAnswer2.Text = "No") MessageBox.show ("Basketball") Else MessageBox.show ("Hockey") End If Else If (strAnswer1 = "No") Then MessageBox.show ("Opera") Else MessageBox.show ("Philharmonic") End If End If
If/Case Statements • How could I create a statement that would do the following? • I have a system with 3 tax brackets. I need to determine who falls into which one and set the tax rate accordingly. The brackets and tax rates are $0-$5,000 (2%), $5,001 - $10,000 (4%), $10,001 + (6%). Assume that there is a variable (intAnnualIncome) that holds the data.
If/Case Statements • How could I create a statement that would do the following? • Manages the withdrawl from a bank. If the person withdraws less than they have in the bank, let them have the money. If they try to withdraw more than the have, block the access. Also, they cannot withdraw more than $250 at a time regardless of how much they have.
If/Case Statements • How could I create a statement that would do the following? • In order to take a 300 level course, a student must first take any two of three 200 level courses. Assume that the classes are 201, 205 and 210 and that the record of taking them or not are in blnClass201, blnClass205 and blnClass210.