You are on page 1of 4

Chris Timble

Tuesday Night
7/22/2014

Unit 6
Assignment & Research
Research:
The five advantages and disadvantages of using case structures to program
multiple alternative decisions::
Advantages:
1. Easy to create Logic Flows
2. Discernible with little effort
3. Low CPU overhead
4. Static depth, whereas if-blocks can be nested into infinity
5. < > //
Disadvantages:
1. Case-Specific (not re-useable)
2. Static, not Dynamic
3. Must be actively maintained
4. Bloated syntax , consumes space and can be better attenuated with a function
or equation.
5. easily improperly used

Assignment:
6. Call()
Select
Case 1:
Display You Selected A
Case 2:

Display You Selected 2


Case 3:
Display You Selected 3
Case 4
Display You Selected 4
Case Else
Display Not good with numbers, eh?
End Module
7.
If speed >= 24 and speed <= 56 Then
Console.WriteLine (Speed is Normal)
ElseIf speed < 24 and speed >56 Then
Console.WriteLine (Speed is Abnormal)
End If
8.
If points > 8 and points <52 Then
Console.WriteLine (Valid Points)
ElseIf points < 9 and > 51 Then
Console.WriteLine (Invalid Points)
End If
9.
Call month(ByRef month As Integer)
Select month
Case 1:
Display January has 31 days

Case 2:
Display February has 28 days
Case 3:
Display March has 31 days
Case Else
Display Invalid Selection
End Module
10.
If hours = minimum Then
Display Hours 10
Else
Display Hours is 0
5.
If red and blue Then
Display Purple
ElseIf red and yellow Then
Display Orange
ElseIf blue and yellow Then
Display Green
Else
Display You are Color Blind
End If

8.

Input pennies
Input nickles
Input dimes
Input quarters
Total = total + pennies + (nickles *5) +(dimes *10) + (quarters*25)
If total = 100 Then
Display Congratulations you won
ElseIf < $1 Then
Display (Total is less than a Dollar)
Else
Display (Total is more than a Dollar)

You might also like