May 2000 final exam study guide

  1. Encrypting string data was an exercise used as an assignment in BASIC back in spring of 1984 in Survey of Computing. VISUAL BASIC did not yet exist. GUIs existing, but only in research labs. See your handout from last week. This program you worked on in small groups. It is a good review of For loops, nested loops, the concatenate operator, the Len and the Mid string functions.

    • ListBox movie rental questions. As you know from the last day of class on April 28th, 2000, this program asks you to look at the screen snapshot of the running application along with the immediate window and surmise what movies have been rented or deleted and in what order. You also see the code for the Form_Load event, which initially filled the movie ListBox control.

    • Here is a more challenging movie rental questions page from the summer 99 final exam.

    • Here is a the MOST challenging movie rental questions page from the April 28th last lecture handout.

    • Here is the movie rental listbox program code. movie rental CODE! You have this as a handout from the last lecture and worked on it as a group exercise.

    • Here are the 16 steps to answer movie rental problem mystery from last Friday's group exercise and handout. The listbox control has its SORTED property set to TRUE. See the code and the screen snapshot from the links above, if you do not have the class handout.

  2. The Dancing U N I program and all of its lessons should be studied. DANCING U N I control array with a Timer control.

  3. Past quiz and exam questions. There are 21 practice questions to try out.

  4. There will be some True/False, Multiple Choice, and fill in the blank questions over the waggle dancing bees and Ghostbuster's problem solving handouts and lectures. The lessons on phases or stages of the problem solving process are very important.

  5. Option Explicit, Static, Dim, MsgBox, InputBox, and all string manipulation using Left, Mid and Right functions and perhaps the page 81 function to find the length of a string too.

26. What does the following statement do?  Explain carefully.

                              PSet (100, 200), RGB(0, 0, 255)

27. Carefully describe what the very 1st thing is that the following Visual Basic
    statement does or causes the computer CPU to do or perform?  (The statement
    consists of 5 different steps).
                                            whichPt = Int(Rnd() * 3 + 1)

28. What is the 2nd action that occurs during the CPU's execution of the above
    Visual Basic statement?  Describe it carefully and precisely.

29. What are the main two properties of a Timer control that a programmer needs
    to use the most often?

30. Write the event procedure for a Timer named Timer1 so that it changes the
    lblPanthers background color to a randomly chosen new color (one of 16 million)
    every 1/2 second.  Write the entire event procedure, not just the statements
    that would go inside of it.

31. Write a command button event for the button called cmdPauseResume so that it
    would cause the Timer1 to stop if it was going and to start again (RESUME) if
    it was paused.  The message on your command button should say Pause if the
    color changing is running and it should say Resume if it is currently paused.
    (This exercise relates to item 30, shown above here).

32. What is biction?  Why would biction be very important in doing well on question
    31 above, in a test situation?  What does biction have to do with the 
    stages and phases of problem solving?  What does it have to do with listening.

33. What does the waggle dancing of bees have to do with the programming and
    problem solving process?

34. Why is "Resist the urge to code" one of the most important proverbs for
    programmers?  Explain.

Compare the lstCategory_Click event code to the SQL laden version!

Named Queries make the code simpler and we can escape the scary SQL by creating and naming the 3 queries in Access in the movies.mdb database.

Common Dialog control and Databases

Another example of the Common Dialog control for the ShowOpen method and filtering for certain filetyps. See below.

Private Sub mnuOpen_Click()

'    theFileName = InputBox("What file would you like to try?" & vbCrLf _
'                           &  "Example 1:  A:\mygraphic" & vbCrLf     _
'                           &  "Example 2:  Z:\web\mybutton.gif")

    cdbDialog.DialogTitle = "Open a favorite graphics picture"
    cdbDialog.Filter = "*.gif;*.jpg;*.bmp"
    cdbDialog.FileName = "*.gif;*.jpg;*.bmp"

    pic.Picture = LoadPicture(cdbDialog.FileName)
End Sub