CST1801 Visual
Basic I
Lab Week 3
Exercises |
Exercise 7.6 (10
points)
Rock, scissors, paper game in its original form, each of the two players simultaneously chooses one of rock, scissors, or paper. Rock beats scissors, paper beats rock, and scissors beats paper. If both players choose the same, it is a draw. Write a program to play the game. The player selects one three buttons marked rock, scissors, or paper. The computer makes its choice randomly using the random number generator. The computer also decides and displays who has won. Result (Save to your local machine and run) Note: Extra credit if you keep score. (4 points) Note: Extra credit if you create both 32x32 and 16x16 pixel custom icons for your program. (2 points) |
Exercise 4.11 (10
points)
A palindrome is a number or a text phrase that reads the same backwards as forwards. For example, each of the following five-digit integers are palindromes: 12321, 55555, 45554, and 11611. Write an application that reads in a five-digit integer and determines whether it is a palindrome. If the number is not five digits, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value. Result (Save to your local machine and run) Note: Extra credit if you are able to add the OK button to the message box and also have an icon on the message box. (2 points) Extra credit if you clear the previous palindrome message as soon as you begin entering in a new number. (2 points) |