Marking Period 1

Click for Instructions
Click on the date to open the details.
Click date again to close the details.
Day Date   Discussion
09/05/05 Monday - Labor Day Holiday
Extra Credit -- Send e-mail to Mr. Clarke before school starts asking for Extra Credit and receive Extra Credit!!!
09/06/05 Tuesday - OCVTS School Closed - Teacher's Preparation Day
1 09/07/05 Wednesday - Classroom Rules - Welcome to Computer Science
  1. Classroom Discussion -
    1. Message from Principal - read, sign, & return
    2. Emergency Cards - fill out completely and return
    3. Computer Contract - read, sign, & return
    4. Social Security Numbers - fill out completely and return, required because the computers we're using were purchased with federal grant monies
    5. Consent Form - for publications purposes
    6. Student Handbook & School Rules - guidelines for a successful year
    7. Cell Phones/Beepers/Pagers - NJ State Statute ANN. 2C:33-19 prohibits students to bring or possess at any time on school property
    8. Smoking - NJ State Statute 26:3D-17 prohibits smoking anywhere in school buildings or on school grounds
    9. Grading Policy - 1/3 attendance & participation, 2/3 tests, quizes, lab assignments
    10. Notebooks - handouts, returned assignments, notes
    11. Discipline Policy - rules & regulations
    12. Dress Code - no offensive clothing, no hats
    13. CD Players, etc. - not required for classroom activities
    14. Large Sums of Money - not required for classroom activities
    15. Driving Policy - students may not drive without prior approval from the Principal
    16. Safety - guidelines
    17. Fire Drills - exit route and outside meeting place
    18. School Lockdown Procedures - student response to emergencies
    19. Attendance - manditory (you can't learn if you're not here)
    20. Hall Passes - ask teacher for permission to leave classroom
    21. Bathroom Passes - ask teacher for permission to leave classroom
    22. Computer Science Pre-Test - later this week
    23. School/Community Service Project - voluntary
    24. Food & drink - not allowed in classroom
    25. Student Grievance Procedures - posted on board
    26. Skill Profiles - posted on board
    27. Student "CSS##" ID numbers
  2. Lab Assignment -
    1. Review classroom rules
    2. Forms to complete and return to teacher:
      1. Message from Principal - student signature
      2. Emergency Card - student fills out
      3. Computer Contract - student and parent/guardian signatures
      4. Social Security Number - student signature
      5. Consent Form - parent/guardian signature
    3. Research "History of Computing" online, take notes, bookmark the best sites, and be prepared to participate in classroom discussion tomorrow
    4. Contact information - send "mclarke@mail.ocvts.org" an e-mail from your e-mail address
    5. Contact AIM contact name - add "compSciClarke" to your contacts
    6. Guidelines to Add New Printer:
      1. Click "Start"
      2. Click "Printers and other hardware"
      3. Identify any existing printers (HP LJ5) and (Tektronix)
      4. If they both exist, simply close the printers window, otherwise, continue:
      5. Click "Add a Printer" to open the Printer Wizard
      6. Read the Welcome Message and Click "Next"
      7. Our printers are Network Printers, click that button, and click "Next"
      8. Search for printers
      9. Click "HP LJ5" and click "Next"
      10. Click "Finish" to add the printer
      Repeat for the "Tektronix" printer

2 09/08/05 Thursday - Classroom Rules, Computer IDs, & History of Computer Hardware
  1. Classroom Discussion -
    1. Review yesterday
    2. History of Computing
  2. Lab Assignment -
    1. Review classroom rules
    2. Forms to complete and return to teacher:
      1. Message from Principal - student signature
      2. Emergency Card - student fills out
      3. Computer Contract - student and parent/guardian signatures
      4. Social Security Number - student signature
      5. Consent Form - parent/guardian signature
    3. Research "History of Software" online, take notes, bookmark the best sites, and be prepared to participate in classroom discussion tomorrow
    4. Contact information - send "mclarke@mail.ocvts.org" an e-mail from your e-mail address
    5. Contact AIM contact name - add "compSciClarke" to your contacts

3 09/09/05 Friday - Classroom Rules, History of Software, Intro to Visual Basic, "vbHelloWorld"
  1. Classroom Discussion -
    1. Review School Rules
    2. History of Software:
      • Computer System:
        • Hardware: System Box, Keyboard, Mouse, Monitor, Printer, etc.
        • Software: Operating System & Applications Software
        • People: Requried to input data and receive output information
        • Data: Facts & Figures
      • Computer System does four things:
        • Input: Information put into a communications system for transmission or into a computer system for processing: Keyboard & Mouse
        • Process: A part of a running software program or other computing operation that does a single task
        • Storage: The part of a computer that stores information for subsequent use or retrieval: Hard Disk, Floppy Disk, Memory Stick, Optical Disk
        • Output: The information produced by a program or process from a specific input: Monitor, Printer
      • Two types of software:
        • Operating Systems: Software designed to control the hardware of a specific data-processing system in order to allow users and application programs to make use of it
        • Applications Software: a program that gives a computer instructions that provide the user with tools to accomplish a task
      • Operating Systems:
        • MS-DOS: Microsoft Disk Operating System
        • Windows: A rectangular area on the screen that displays its own file or message independently of the other areas of the screen
        • Apple OS: Apple Computer Corporation Operating System
        • Unix: An interactive time-sharing operating system invented in 1969
        • Linux: An implementation of the Unix kernel originally written from scratch with no proprietary code
      • Applications Software:
        • Word Processing: The creation, input, editing, and production of documents and texts by means of computer systems
        • Spreadsheet: An accounting or bookkeeping program that displays data in rows and columns on a screen
        • Database: Programs to ease the collection of data arranged for ease and speed of search and retrieval
        • Presentation: Software program for creating graphic presentations with visual aids, handouts, slides, etc
        • Entertainment: Software that amuses, pleases, or diverts
        • Education: Software whereby knowledge or skill is obtained or developed by a learning process
        • Communications: Software for sending and receiving messages
      • Software Developers use Programming Languages to create both Operating Systems and Applications Software:
        • Source Code: Before interpreting or compiling: Code written by a programmer in a high-level language and readable by people but not computers. Source code must be converted to object code or machine language before a computer can read or execute the program
        • Machine Code: After interpreting or compiling: The code produced by a compiler from the source code, usually in the form of machine language that a computer can execute directly
      • Two main types of programming languages:
        • Interpreter: A program that translates an instruction into a machine language and executes it before proceeding to the next instruction
        • Compiler: A program that translates another program written in a high-level language into machine language so that it can be executed
      • Basic is an interpreted language. Visual Basic may also be compiled into executable code.
    3. Introduction to Visual Basic:
      • Different ways to open the VB IDE in Windows
      • VB IDE - Integrated Development Environment
      • Menu Options & Features
      • Toolbox, Project, & Properties Windows
  2. Lab Assignment -
    1. Review classroom rules
    2. Forms to complete and return to teacher:
      1. Message from Principal - student signature
      2. Emergency Card - student fills out
      3. Computer Contract - student and parent/guardian signatures
      4. Social Security Number - student signature
      5. Consent Form - parent/guardian signature
    3. Research "Word Processing" and "Microsoft Word Tutorial" online, take notes, bookmark the best sites, and be prepared to participate in classroom discussion Monday
    4. Create a Visual Basic program "HelloWorld":
      1. Open VB & create a new, standard.exe
      2. Save the form as "frmHelloWorld.frm" and save the project as "vbHelloWorld.vbp", both into your "My Documents/vb" folder
      3. Name the form "frmHelloWorld"
      4. Add a Textbox object and name it "txtHelloWorld"
      5. Change the Text property to "Hello World!"
      6. Change font sizes as desired
      7. Change background and foreground colors
      8. Save frequently
      9. Test and debug your program (call me for assistance)
    5. Contact information - send "mclarke@mail.ocvts.org" an e-mail from your e-mail address
    6. Contact AIM contact name - add "compSciClarke" to your contacts

4 09/12/05 Monday - History of Software, Visual Basic Label, Textbox, & CommandButton objects, "vbAge"
  1. Classroom Discussion -
    1. Parental/Guardian signed forms due: no computer contract = no computer use
    2. Review Software History from Friday
    3. Some Definitions:
      • Program: A sequence of instructions that a computer can interpret and execute
      • Programming: Creating a sequence of instructions to enable the computer to do something
      • Systems Analysis: The study of an activity or procedure to determine the desired end and the most efficient method of obtaining this end
      • Writing a good program is the act of taking a large problem and continually splitting it into smaller and smaller sub-problems unti you reach a point where each sub-problem requires one solution and is easy to program
      • These smaller programs are called "sub-procedures", sub-routines" or "functions"
      • Syntax: The rules governing the formation of statements in a programming language. Every programming language has similar, but different, syntax rules
      • Computer Error: the occurrence of an incorrect result produced by a computer
      • Three types of computer error:
        • Syntax Error: an error in a program due to a code that does not conform to order expected by the programming language, detected during compiling or interpreting
        • Run-Time Error: an error in arithmetic during computer run that, detected at run time
        • Logic Error: an error the programmer makes during design of the program, the program compiles and runs but gives incorrect results
      • Computer User: A person who uses computers for work or entertainment or communication or business. Most users lack full unserstanding of how to truly use a computer. Some users are actually afraid of the computer. All users are either slow to learn or understand; obtuse or tend to make poor decisions or careless mistakes. Therefore, it is up to the programmer to make the program as "idiot-proof" as humanly possible
      • Users are [insert appropriate word here]!!!
  2. Lab Assignment -
    1. Take the School Rules Quiz. Click the link and follow the instructions. You MUST score 100% on this quiz.
    2. Create a Visual Basic program "Age":
      1. Open VB & create a new, standard.exe
      2. Save the form as "frmAge.frm" and save the project as "vbAge.vbp", both into your "My Documents/vb" folder
      3. Name the form "frmAge", change the caption to "Given your age, calculate your year of birth"
      4. Add a Label object, name it "lblTitle", change the caption to "Instructions: Enter your age in the age box and click GO to calculate your year of birth"
      5. Add a Label object, name it "lblAge", change the caption to "Age"
      6. Add a Textbox object, name it "txtAge", change the caption to ""
      7. Add a CommandButton object, name it "cmdGo", change the caption to "&Go", change the default property to "True"
      8. Add a Label object, name it "lblYear", change the caption to "Year of Birth"
      9. Add a Textbox object, name it "txtYear", change the caption to ""
      10. Add a CommandButton object, name it "cmdExit", change the caption to "e&Xit", change the cancel property to "True"
      11. Double-click the CommandButton object "cmdExit" and enter "End". This programming instruction, when clicked, will cause the program to stop running
      12. Double-click the CommandButton object "cmdGo" and enter "txtYear.Text = 2005 - txtAge.Text". This programming instruction, when clicked, will change the Textbox object "txtYear" "Text" property to be the result of the process of subtracting the user's age, found in the Textbox object "txtAge" "Text" property, from the year 2005
      13. Center the instructions across the top of the form
      14. Change font sizes as desired
      15. Change background and foreground colors
      16. Save frequently
      17. Test and debug your program (call me for assistance)

5 09/13/05 Tuesday - Putting Code into Visual Basic, Image Object, "vbTrafficLight"
  1. Classroom Discussion -
    1. Parental/Guardian signed forms due: no computer contract = no computer use
    2. Review Definitions from Monday
    3. Review Chapters 1-4 from Free-Ed.Net on Visual Basic
    4. Discuss Chapter 5 from Free-Ed.Net on Visual Basic, "Putting Code into VB"
    5. Discuss the Image object and it's properties
  2. Lab Assignment -
    1. Take the School Rules Quiz. Click the link and follow the instructions. You MUST score 100% on this quiz.
    2. Create a simple VB program to display a traffic light image. Provide the user with three command buttons "Stop", "Caution", and "Go". These buttons will control which of three images will display in the form on the screen:
      1. Use Microsoft Paint to create three image files called "Stop.bmp", Caution.bmp", "Go.bmp"
      2. Save these to your "My Documents/vb" folder
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save the form and project to your "My Documents/vb" folder as "frmTrafficLight.frm" and "vbTrafficLight"
      3. Name the form "frmLight"
      4. Add an image object to the center of your form
      5. Name the image object "imgLight"
      6. Change the size to make it twice as high as it is wide
      7. Save frequently
      8. Add a command button.
      9. Name the command button "cmdStop"
      10. Change the caption to read "Stop"
      11. Double-Click the "cmdStop" command button to open the code window
      12. Add this line: "imgLight.Picture = LoadPicture("Stop.bmp")"
      13. If your files are stored in another folder, change the folder path
      14. Save frequently
      15. Add another command button for "Caution", change the name, change the caption, add the code
      16. Save frequently
      17. Add another command button for "Go", change the name, change the caption, add the code
      18. Save frequently
      19. Add a label named "lblInstructions" with a caption instructing the user to press the buttons to see the light change
      20. Save frequently
      21. Add another command button for "Exit"
      22. Name the Command Button "cmdExit"
      23. Change the Command Button caption to "e&Xit"
      24. Change the Cancel property to "True" for the excape key
      25. Double-Click the Command Button to open the Code Window
      26. Add "End" after the subroutine title cmdExit_Click() line and before the End Sub line
      27. Save frequently
      28. Use menu bar options "Run", "Start" to test your program
      29. Save frequently
      30. Test and debug your program (call me for assistance)
      31. Extra Practice Figure out how to display the stop light when the program starts before the user presses any buttons

6 09/14/05 Wednesday - Visual Basic Practice with Image, Label, Textbox, and Command Button Objects, "vbImageDisplayer", "vbTextDemo", "vbRailDemo"
  1. Classroom Discussion -
    1. Parental/Guardian signed forms due: no computer contract = no computer use
    2. Online textbook Free-Ed.Net on Visual Basic
    3. Nothing new, just practice with VB Image, Label, Textbox, and Command Button objects. See how much you can do without asking for my assistance, but ask for assistance when you need it
  2. Lab Assignment -
    1. Take the School Rules Quiz. Click the link and follow the instructions. You MUST score 100% on this quiz
    2. Create a simple VB program to display images two ways, normal and stretched:
      1. Windows contains a large number of bitmap and other graphics files
      2. Use a text box into which the user enters the name of a graphical image
      3. When the user clicks a command button, display the selected graphics file in two Image objects
      Some ideas:
      1. Start Visual Basic
      2. Save as "frmImageDisplayer.frm" and "vbImageDisplayer.vbp" to your "My Documents/VB" folder
      3. Rename the Form to "frmDisplayer"
      4. Resize the Form to about twice as wide as it is high
      5. Change the caption property to read "John Doe's Image Displayer", but use your name
      6. Add a Label object named "lblImageFileName" and change the caption property to something like "Enter File Name:"
      7. Add a Textbox object named "txtImageFileName" and change the text property to be blank
      8. Add two Image objects, the first on the left, the second on the right
      9. Name the first Image object "imgLeft" and the second "imgRight"
      10. Make both Image objects the same size and large
      11. Change the stretch property for imgRight to "True"
      12. Add a Command Button object named "cmdDisplay" and change the caption property to "&Display"
      13. Set this Command Button to run when the "Enter" key is pressed
      14. Double click the "cmdDisplay" command button and add these lines to the code window:
        "imgLeft.Picture = LoadPicture(txtImageFileName.Text)"
        "imgRight.Picture = LoadPicture(txtImageFileName.Text)"
        
        Your names must match my names for this code to work
      15. Add a Command Button object named "cmdExit" and change the caption property to "e&Xxit"
      16. Set this Command Button object to run when the "Escape" key is pressed
      17. Write the code for the "Exit" button
      18. Save frequently
      19. Test and debug your program (call me for assistance)
      20. SAVE FREQUENTLY
      21. Extra Practice Figure out how to make the text window a dropdown menu with all the images in a folder listed
    3. Create a VB program to demonstrate how text can be moved to different control instances on a form:
      1. When the user clicks on button 1, copy the caption from button 1 to the caption of label 1 and the text of text box 1
      2. When the user clicks on button 2, copy the caption from label 2 to the text of text box 2
      3. When the user clicks on button 3, copy the text from text box 3 to the caption of label 3
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save to your "My Documents/vb" folder as "frmTextDemo.frm" and "vbTextDemo.vbp"
      3. Create a form with three labels, three text boxes, and three command buttons
      4. Name the form "frmTextDemo"
      5. Arrange the objects so they look good
      6. Name the form "frmTextDemo" and change the caption to something appropriate
      7. Name the first text box "txt1" and change the text to read "Text Box 1"
      8. Name the second text box "txt2" and change the text to read "Text Box 2"
      9. Name the third text box "txt3" and change the text to read "Text Box 3"
      10. Name the first label "lbl1" and change the caption to read "Label 1"
      11. Name the second label "lbl2" and change the caption to read "Label 2"
      12. Name the third label "lbl3" and change the caption to read "Label 3"
      13. Name the first command button "cmd1" and change the caption to read "Button 1"
      14. Name the second command button "cmd2" and change the caption to read "Button 2"
      15. Name the third command button "cmd3" and change the caption to read "Button 3"
      16. Double click the first command button and add this code:
        lbl1.Caption = cmd1.Caption
        txt1.Text = cmd1.Caption
        
      17. Double click the second command button and add this code:
        txt2.Text = lbl2.Caption
        
      18. Double click the third command button and add this code:
        lbl3.Caption = txt3.Text
        
      19. Add an Exit command button, change the name and caption. Use the "&" to make a hotkey. Make it so the "escape" key will activate the Exit event. Double click the Exit command button and add the code to "End" the program
      20. Use the techniques you learned over the past couple of days
      21. Save frequently
      22. Test and debug your program (call me for assistance)
      23. Extra Practice What would happen if the user changed the text in text box 2 and then clicked on command button 2? Test your thesis
    4. Create a VB program to simulate a railroad train schedule:
      1. Design a form that would allow the user to choose between displaying "Morning", "Afternoon", or "Evening" train schedules
      2. The information to be displayed would be "Scheduled Departure Time", "Track Number", and "Train Status"
      3. Leave room to display up to five trains
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save to your "My Documents/vb" folder as "frmRailDemo.frm" and "vbRailDemo.vbp"
      3. Name the form "frmRailDemo"
      4. Add a Command Button object for "Exit", write the code, make the "Escape" key work
      5. Math time -- you need three labels (Time, Track, and Status) for each of five trains:
        3 x 5 = 15
        
        so, you need to add 15 Label objects. Be sure to name each one separately, something like:
        lblTime1, lblTrack1, lblStatus1
        lblTime2, lblTrack2, lblStatus2
        lblTime3, lblTrack3, lblStatus3
        lblTime4, lblTrack4, lblStatus4
        lblTime5, lblTrack5, lblStatus5
        
        Arrange them on the form so they look good.
      6. Make the "Border Style" property for all Label objects "Fixed Single" so that they look like unchangable Textbox objects
      7. Write the code for the "Morning" Command Button object:
        lblTime1.Caption = "7:00 a.m."
        lblTrack1.Caption = "Track 2"
        lblStatus1.Caption = "On Time"
        lblTime2.Caption = "7:20 a.m."
        lblTrack2.Caption = "Track 1"
        lblStatus2.Caption = "On Time"
        lblTime3.Caption = "8:00 a.m."
        lblTrack3.Caption = "Track 3"
        lblStatus3.Caption = "Delayed"
        lblTime4.Caption = "8:30 a.m."
        lblTrack4.Caption = "Track 1"
        lblStatus4.Caption = "On Time"
        lblTime5.Caption = "9:00 a.m."
        lblTrack5.Caption = "Track 2"
        lblStatus5.Caption = "On Time"
        
        Remember that your program will only work with my code if you use the same object names that I have
      8. Write similar code for the "Afternoon" and "Evening" Command Button objects
      9. Save frequently
      10. Test and debug your program (call me for assistance)
      11. Extra Practice - Make one of the "Afternoon" blank and have only four trains
    5. Your "H:" drives should now work. You may only access your own "H:" drive. I can access all "H:" drives. Copy your work there so I may see it:
      1. Open "Windows Explorer" or "My Documents" and navigate to "H:"
      2. Create a sub-folder "VB"
      3. COPY all of your Visual Basic files (everything) from "My Documents/VB" to "H:/VB"
      4. Every day, after your work is complete, copy the most recent files to the proper folder on the "H:" drive

7 09/15/05 Thursday - Visual Basic and Variables, "vbVariableDemo"
  1. Classroom Discussion -
    1. Parental/Guardian signed forms due: no computer contract = no computer use
    2. Discuss Chapter 5 from Free-Ed.Net on Visual Basic, "Lesson 5 - Putting Code into VB"
    3. Discuss:
      • Standard data types - number, text, date, boolean
      • VB data types - boolean, byte, currency, date, decimal, double, integer, long, object, single, string, variant
      • Declare variables in VB - Dim VarName As DataType
      • Dim statement locations - Global vs. local
      • How to assign data to variables - VarName = Expression
      • Alternate - Dim VarName As DataType : VarName = Expression
      • Math operators - Add "+", Subtract "-", Multiply "*", Divide "/", Power "^", Concatenate "&"
      • Why data type mixups can occur:
        Dim Result As Integer : Result = 1 / 2
        Dim GrossPay As Single : GrossPay = 40 * 5.50
        
  2. Lab Assignment -
    1. Take the School Rules Quiz. Click the link and follow the instructions. You MUST score 100% on this quiz.
    2. Create a simple VB program to test data type mixups:
      1. Assign a real number to an integer variable & display the integer variable in a label caption
      2. Assign an integer number to a real variable & display the integer variable in a label caption
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save the form and project to your "My Documents/vb" folder as "frmVariableDemo.frm" and "vbVariableDemo"
      3. Name the form
      4. Add code for two global variables at the top of the code window:
        Dim sngNum As Single
        Dim intNum As Integer
        
      5. Add a command button and code and "cancel" for exit
      6. Add a text box for input "txtInput"
      7. Add a label for output "lblOutput"
      8. Add a command button and code for RealInteger
        intNum = txtInput.Text
        lblOutput.Caption = intNum
        
      9. Test with a real number, like "2.5". Is the output real or integer?
      10. Add a command button and code for IntegerReal
        sngNum = txtInput.Text
        lblOutput.Caption = sngNum
        
      11. Test with an integer number, like "7". Is the output real or integer?
      12. Save frequently
      13. Test and debug your program (call me for assistance)
      14. Extra Practice What happens if you enter a word or a date?
    3. Create a VB program to perform common distance conversions:
      1. Inches to Centimeters
      2. Centimeters to Inches
      3. Feet to Meters
      4. Meters to Feet
      5. Miles to Kilometers
      6. Kilometers to Miles
      For your conversion numbers:
      1. 1 inch = 2.54 centimeters
      2. 1 centimeter = 0.4 inches
      3. 1 foot = 0.305 meters
      4. 1 meter = 3.28 feet
      5. 1 mile = 1.6 kilometers
      6. 1 kilometer = 0.625 miles
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save the form and project to your "My Documents/vb" folder as "frmDistanceConverter.frm" and "vbDistanceConverter"
      3. Add a textbox for input
      4. Add a label for output
      5. Add instructions to the user
      6. Add and name a command button for each conversion
      7. Here's the general steps for each button:
        1. Assign the input text into a variable
        2. Calculate the answer
        3. Assign the answer to the output label caption
        4. For example, Inches to Centimeters, if you use these variable names:
          dblInput = txtInput.text
          dblOutput = dblInput * 2.54
          lblOutput.caption = dblOutput
          
      8. Add a command button and code and "cancel" for exit
      9. Save frequently
      10. Test and debug your program (call me for assistance). Use numbers that are easy to confirm. For example:
        10 inches = 25.4 centimeter
        10 centimeters = 4.0 inches
        
      11. Extra Practice Add some other useful distance conversions

8 09/16/05 Friday - Visual Basic Review and Quiz, "vbTemperatureConverter"
  1. Classroom Discussion -
    1. Parental/Guardian signed forms due: no computer contract = no computer use
    2. Next week my AM class is assigned the pledge and morning announcements - any volunteers?
    3. Discuss:
      • Global Variables - Declared at the top of the program, usable by any part of the program
      • Local Variables - Declared inside a sub-routine, usable by ONLY that sub-routine
      • OPTION EXPLICIT - Written as the first line of the program, requires the programmer to correctly declare and spell any and all variables -- a great programming technique
      • Variable Naming Convention:
        • Must start with a letter
        • May contain letters and numbers
        • May NOT contain special characters
        • May contain underscore "_"
        • Use the 3-letter prefix patterns:
          • int for integer
          • sng for single
          • dbl for double
          • str for string
          • bln for boolean
          • dtm for date
        • Should make sense to another programmer:
          • use intAge instead of a
          • use sngPayRate instead of pr
          • use dblLightSpeed instead of ls
          • use strFirstName instead of fn
          • use blnIsActiveMember instead of iam
          • use dtmBirthDate instead of bd
      • Variable Declaration Syntax - "Dim VarName As DataType" - Examples:
        • Dim intAge As Integer
        • Dim sngPayRate As Single
        • Dim dblLightSpeed As Double
        • Dim strFirstName As String
        • Dim blnIsActiveMember As Boolean
        • Dim dtmBirthDate As Date
    4. Review before Quiz - NOW is the time to ask your questions
  2. Lab Assignment -
    1. Take the School Rules Quiz. Click the link and follow the instructions. You MUST score 100% on this quiz
    2. Take the Visual Basic Quiz 1. Click the link and follow the instructions. You only get one chance - this is not "try until you score 100". Open notes, open internet, open VB IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student
    3. Create a VB program to perform common temperature conversions:
      1. Fahrenheight to Centigrade
      2. Centigrade to Fahrenheight
      For your conversion numbers:
      1. Fahrenheight temperature is 9/5ths of the Centigrade temperature plus 32 (do the plus 32 last)
      2. Centigrade temperature is 5/9ths of the Fahrenheight temperature minus 32 (do the minus 32 first)
      3. (If you can't figure out the conversion, watch the board, I'll do some examples)
      Some ideas:
      1. Open VB & create a new, standard.exe
      2. Save the form and project to your "My Documents/vb" folder as "frmTemperatureConverter.frm" and "vbTemperatureConverter"
      3. Add a textbox for input
      4. Add a label for output
      5. Add instructions to the user
      6. Add variables at the top of the program
      7. Add and name a command button for each conversion
      8. Here's the general steps for each button:
        1. Assign the input text into a properly named variable of the proper data type
        2. Calculate the answer and assign the answer to the output label caption
      9. Add a command button and code and "cancel" for exit
      10. Save frequently
      11. Test and debug your program (call me for assistance). Use numbers that are easy to confirm. For example:
        68o F = 20o C and 20o C = 68o F
        77o F = 25o C and 25o C = 77o F
        86o F = 30o C and 30o C = 86o F
      12. Extra Practice Add some other useful temperature conversions, like Kelvin
    4. Complete any unfinished labs

9 09/19/05 Monday - English, Pledge & Announcements, VB Input/Output, "vbTemperatureConverter2"
  1. Classroom Discussion -
    1. One AM student needed as volunteer to assist Mr. Coleman with the morning pledge and announcements
    2. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
    3. VB Code Comments or Remarks - Remarks help both you and other programmers who might modify and update your Visual Basic applications in the future. Remarks offer descriptive messages that explain in English (or whatever language you prefer) what's going on in the program's event procedures:
      REM This is one example of a remark
      ' This an example of a comment
      Dim intAge As Integer REM This is a third example of a remark
      intAge = 17 ' And this is a fourth example of a comment
      
      Programmers often add remarks to their programs for the following purposes:
      • To state the programmer's name and the date that the program was written
      • To describe in the general section the overall goal of the program (the general section appears before all of a procedure's procedures and is the location Hour 5, "Putting Code into Visual Basic," described when it talked about declaring global variables)
      • To describe at the top of every procedure the overall goal of that procedure
      • To explain tricky or difficult statements so that others who modify the program later can understand the lines of code without having to decipher cryptic code
    4. VB Output - MsgBox() - Instructions or output to the user, returns a number that tells which button the user has clicked:
      • Syntax:
        intVariable = MsgBox( strMsg [, [intType] [, strTitle]])
        
      • strMsg - the content of the message to the user
      • intType - optional buttons or icons to be displayed
      • strTitle - optional message box title bar text
    5. Do lab 1
    6. VB Input - InputBox - Another way to get input, returns a string value that holds the answer typed by the user:
      • Syntax:
        strVariable = InputBox( strPrompt [, [strTitle] [, strDefault] [, intXpos, intYpos]]])
        
      • strPrompt - the content of the message to the user
      • strTitle - optional message box title bar text
      • strDefault - optional default input so that the user can just hit [OKAY]
      • intXpos - number of twips from the left side
      • intYpos - number of twips from the top
    7. Do lab 2
    8. Lab Assignment -
      1. Modify your "vbTemperatureConverter.vbp" program to use a MsgBox:
        1. Use a MsgBox to tell the user goodbye on exit
        Some ideas:
        1. Use windows explorer and navigate to where your program "vbTemperatureConverter.vbp" is saved and open it
        2. Add a new global variable at the top:
          Dim intMsgRes As Integer
          
        3. View the form and double click command button exit
        4. Add VB code for a MsgBox before the "End" command:
          intMsgRes = MsgBox("Goodbye") ' This line added 09/19/05
          
        5. Test it to see how it works
        6. Modify the VB msgbox code to see how some of the icons and buttons and title work:
          intMsgRes = MsgBox("Goodbye", vbInformation, "Exit Message") ' Modified 09/19/05
          or
          intMsgRes = MsgBox("Goodbye", vbOKOnly, "Son of a Gun") ' Modified 09/19/05
          or
          intMsgRes = MsgBox("Goodbye", vbExclamation + vbonly, "This is Fantastic")
          or
          intMsgRes = MsgBox("Goodbye", vbQuestion + vbYesNo, "Or maybe Tanfastic")
          or
          intMsgRes = MsgBox("Goodbye", vbCritical + vbAbortRetryIgnore, "I'm gettin' this")
          
      2. Modify your "vbTemperatureConverter.vbp" program to use an InputBox:
        1. Use an InputBox to allow the user to confirm the temperature
        2. Echo the user input from the textbox as the default in an InputBox and ask the user it this is accurate
        Some ideas:
        1. View the form and double click command button FahrToCent
        2. Add VB code for an InputBox after assigning the textbox to a variable but before processing the variable:
          sngFahr = txtInput.Text
          sngFahr = InputBox("Convert this temperature?", , sngFahr) ' Added 09/19/05
          sngCent = (sngFahr - 32) * 5 / 9
          lblOutput.Caption = sngCent
          
        3. Test it to see how it works
        4. Modify the VB msgbox code to see how the title works:
          sngFahr = InputBox("Convert this temperature?", "Temperature Confirmation, sngFahr)
          
        5. Save frequently
        6. Extra Practice Add a confirm exit MsgBox to all of your VB programs
      3. English - Ms. Gerick will be in today to help us create an instruction manual for software release

    10 09/20/05 Tuesday - Vocabulary, Pledge & Announcements, VB IF THEN Statement, "vbPayroll", "vbGrades"
    1. Classroom Discussion -
      1. One AM student needed as volunteer to assist Mr. Coleman with the morning pledge and announcements
      2. Vocabulary:
        • Three types of statements in every programming language:
          1. Sequential - Following of one after another
          2. Decision - The act of reaching a conclusion or making up one's mind
          3. Iteration - To perform again; repeat
        • Algebra - A branch of mathematics in which symbols, usually letters of the alphabet, represent numbers or members of a specified set and are used to represent quantities and to express general relationships that hold for all members of the set
        • George Boole (1815-1864) - British mathematician and logician who developed a calculus of symbolic logic
        • Boolean - Of or relating to a logical combinatorial system treating variables, such as propositions and computer logic elements, through the operators AND, OR, NOT, and XOR
        • Boolean Algebra - An algebra in which elements have one of two values and the algebraic operations defined on the set are logical OR, a type of addition, and logical AND, a type of multiplication
      3. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      4. Review Arithmetic Operators and Order of Operations (PEMDAS):
        • ( ) Parenthesis
        • ^ Exponentiation
        • * Multiply
        • / Divide
        • + Add
        • - Subtract
      5. Review String Arithmetic Operator:
        • & Concatenate
      6. Comparison Operators:
        • > Greater Than
        • < Less Than
        • = Equal To
        • >= Greater Than or Equal To
        • <= Less Than or Equal To
        • <> Not Equal To
      7. Comparison Rules:
        • Returns True or False
        • Resulting return may be stored in a Boolean variable
        • Compare only two objects at a time
        • Both sides must be the same data type
        • Do not compare non-integer numbers for equality
        • To compare three or more objects, compare pairs using Boolean operators and Boolean Algebra
      8. Comparison Examples:
        • lblSales.Caption > Goal
        • Pay < 2000.00
        • Age = Limit
        • FirstName >= "Mike"
        • Num <= lblAmt.Caption
        • txtAns.Text <> "Yes"
      9. The VB IF THEN Statement:
        • Allows the computer to make a choice of whether or not to perform a process
        • Syntax:
          If comparisonTest Then
          	' One or more Visual Basic statements
          End If
          
        • IF the comparison returns a True result THEN statements before the END IF are performed
    2. Lab Assignment -
      1. Create a new VB program to process payroll:
        1. Receive hours worked from the user
        2. Receive pay rate from the user
        3. Calculate and display gross pay
        4. Calculate and display taxes
        5. Calculate and display net pay
        Program Logic:
        1. User will enter hours worked and pay rate, so you need to save this data to variables
        2. Gross pay is calculated as hours worked times pay rate
        3. Taxes is calculated as 20% of gross pay
        4. Net pay is the result of subtracting taxes from gross pay
        Some ideas:
        1. Open VB & create a new, standard.exe
        2. Save the form and project to your "My Documents/vb" folder as "frmPayroll.frm" and "vbPayroll.vbp"
        3. Create variables at the top:
          Dim sngHoursWorked As Single
          Dim sngPayRate As Single
          Dim sngGrossPay As Single
          Dim sngTaxes As Single
          Dim sngNetPay As Single
          Dim intMsgRes As Integer
          Dim strResults As String
          
        4. Add a command button to exit, set the cancel property to true so the escape key works, add the code to end
        5. Modify the exit button to use a MsgBox to allow the user to confirm upon exit:
          intMsgRes = MsgBox("Really Exit?", vbQuestion + vbYesNo, "Confirm Exit")
          If intMsgRes = vbYes Then
              End ' exit on user click yes
          End If
          
        6. Add a command button to go, set the default property to true so the enter key works, add the code:
          1. Receive sngHoursWorked and sngPayRate from the user using InputBoxes:
            sngHoursWorked = InputBox("Enter Hours Worked", "Hours Worked", 30)
            sngPayRate = InputBox("Enter Pay Rate", "Pay Rate", 10)
            
          2. Calculate gross pay, taxes, and net pay:
            sngGrossPay = sngHoursWorked * sngPayRate
            sngTaxes = sngGrossPay * .2
            sngNetPay = sngGrossPay - sngTaxes
            
        7. Display results to user using a message box:
          strResults = "Hours Worked: " & sngHoursWorked & vbCrLf
          strResults = strResults & "Pay Rate: " & sngPayRate & vbCrLf
          strResults = strResults & "Gross Pay: " & sngGrossPay & vbCrLf
          strResults = strResults & "Taxes: " & sngTaxes & vbCrLf
          strResults = strResults & "Net Pay: " & sngNetPay
          sngmsgres = MsgBox(strResults, vbOKOnly, "Payroll")
          
        8. Test with these numbers. If you enter hours and rate, your resulting gross, taxes, and net should be the same as mine:
          hours rate gross taxes net
          30 10 300 60 240
          40 10 400 80 320
          50 10 500 100 400
        9. Save frequently
        10. Extra Practice What can you think of to do to make this program better?
      2. Create a new VB program to determine a letter grade given a numberical grade. Consider:
        1. Read a number grade and display the appropriate letter grade:
          Number Grade Letter Grade
          93-100 A
          85-92 B
          75-84 C
          65-74 D
          0-64 F
        Some ideas:
        1. Open VB & create a new, standard.exe
        2. Save the form and project to your "My Documents/vb" folder as "frmGrades.frm" and "vbGrades.vbp"
        3. What variables do you need?
        4. Is the number grade variable integer or single?
        5. What data type is the letter grade variable?
        6. How will you receive your input (number grade)?
        7. How will you code the decision the computer needs to make?
        8. Is the order in which you test number grade important?
        9. How will you display the result to the user?
        10. Test all possibilities: 100, 95, 85, 75, 65, 55, 0
        11. Save frequently
        12. Extra Practice What can you think of to do to make this program better?

    11 09/21/05 Wednesday - Career, "vbTicTacToe"
    1. Classroom Discussion -
      1. One AM student needed as volunteer to assist Mr. Coleman with the morning pledge and announcements
      2. Career - News:
      3. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      4. Visual Basic Techniques:
        • Line Object - demo on board, properties
        • Keeping track of the next player - demo on board
        • Change a command button caption by clicking on the button
        • Prevent a second click on a button that's already been clicked once
        • Check for a winner
        • After finding a winner, prevent any more clicks
        • Use a Reset command button to restart the game
    2. Lab Assignment -
      1. Take the Job Seeking Skills Pre-Test. Click the link and follow the instructions. You get one shot at this one, but it doesn't count. You'll take it again in June to see how much you've learned about job seeking
      2. Create a Visual Basic game of Tic Tac Toe:
        1. Open VB & create a new, standard.exe
        2. Save the form and project to your "My Documents/vb" folder as "frmTicTacToe.frm" and "vbTicTacToe.vbp"
        3. Design the form:
          • Exit button, write and test the code
          • Nine command buttons arranged 3 by 3 for the game board named:
            cmdTopLeft cmdTopCenter cmdTopRight
            cmdMidLeft cmdMidCenter cmdMidRight
            cmdBotLeft cmdBotCenter cmdBotRight
          • Place line objects between the buttons for visual effect
          • A label with general instructions
          • Another label to display which player plays next
        4. Variables:
          • strNextPlay to hold either "X" or "O" to indicate which player plays next
        5. Code for cmdTopLeft:
          • Only allow clicks if the button has not already been clicked
          • Determine which player plays next and change the button caption to that letter
          • Change the variable that indicates which player plays next
          • Test it
          • Comment-out the "only allow clicks" decision statement and test it again
        6. Code for cmdTopCenter:
          • Copy the code for cmdTopLeft to cmdTopCenter
          • Change all references to topleft to topcenter
          • Test it
        7. Repeat copy for each of the other seven buttons, testing each time
        8. Remove the comment-out of the "only allow clicks" decision statement in every button
        9. Add a command button for "Reset" and code it to change all button captions to "" and reset and display the which player plays next variable to "X"
        10. Consider how to check for a winner -- how many ways can you score three in a row?
          1. Top row horizontal
          2. Middle row horizontal
          3. Bottom row horizontal
          4. Left column vertical
          5. Center column vertical
          6. Right column vertical
          7. Top left to bottom right diagonal
          8. Top right to bottom left diagonal
        11. Code a single check for winner and announce a winner and test it
        12. After finding a winner, prevent clicks on any play buttons
        13. Code the rest and test them
        14. Copy all the tests to all the command buttons
        15. Extra Practice What can you think of to do to make this program better?

    12 09/22/05 Thursday - Science, Pledge & Announcements, VB IF THEN ELSE Statement, "vbPayroll2"
    1. Classroom Discussion -
      1. One AM student needed as volunteer to assist Mr. Coleman with the morning pledge and announcements
      2. Science:
      3. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      4. Review yesterday: Arithmetic Operators, String Aritmetic Operator, Comparison Operators, Comparison Rules
      5. The VB IF THEN ELSE Statement:
        • Allows the computer to make a choice between two possible processes
        • Syntax:
          If comparisonTest Then
          	' One or more Visual Basic statements A
          Else
          	' One or more Visual Basic statements B
          End If
          
        • IF the comparison returns a True result THEN statements before the ELSE are performed
        • IF the comparison returns a False result THEN statements after the ELSE but before the END IF are performed
    2. Lab Assignment -
      1. Modify your vbPayroll program to work with overtime. Program Logic:
        1. Hours worked up to and including 40 is normal time and receives normal pay
        2. Any hours worked over 40 is considered overtime and receives 1.5 times pay rate
        3. Only hours worked over 40 gets time and a half and this is added to normal 40 hour pay
        4. The computer must make a decision - use an IF THEN ELSE statement
        Some ideas:
        1. Modify the command button where the work is done:
          If sngHoursWorked <= 40 Then
          	sngGrossPay = sngHoursWorked * sngPayRate
          Else
          	sngGrossPay = (40 * sngPayRate) + ((sngHoursWorked - 40) * sngPayRate * 1.5)
          End If
          
        2. Test all possibilities: 100, 95, 85, 75, 65, 55, 0
        3. Save frequently
        4. Extra Practice What can you think of to do to make this program better?

    13 09/23/05 Friday - Grade Print Sheet, Skills USA, Pledge & Announcements, VB Nested IF THEN ELSE Statement, "vbGrades2"
    1. Classroom Discussion -
    2. One AM student needed as volunteer to assist Mr. Coleman with the morning pledge and announcements
      1. Grades in "H:\Grades\" folder. To print:
        • Double-Click to open in Microsoft Excel
        • "Edit" "Select All" or just "Ctrl-A"
        • "Format" "Columns" "Auto Fit"
        • Just print the first page, we may never have enough assignments to fill up more than one page.

          Save the Trees

      2. Skills USA
      3. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      4. Nested VB IF THEN ELSE Statements:
        • Allows the computer to make multiple decisions between multiple choice processes
        • Syntax:
          If comparisonTest1 Then
          	If comparisonTest2 Then
          		' One or more Visual Basic statements A
          	Else
          		' One or more Visual Basic statements B
          	End If
          Else
          	If comparisonTest3 Then
          		' One or more Visual Basic statements C
          	Else
          		' One or more Visual Basic statements D
          	End If
          End If
          
        • IF comparison1 returns a True result THEN comparison2 is tested
        • IF comparison2 returns a True result THEN statements A are performed
        • IF comparison2 returns a False result THEN statements B are performed
        • IF comparison1 returns a False result THEN comparison3 is tested
        • IF comparison3 returns a True result THEN statements C are performed
        • IF comparison3 returns a False result THEN statements D are performed
        • Note: The indentation really does nothing for the compiler; it just makes it easier for us simple humans to read
    3. Lab Assignment -
      1. Modify your vbGrades program to use nested IF THEN ELSE statements. Program Logic:
        1. Perform nested testing to determine where the number grade is
        Some ideas:
        1. Modify the command button where the work is done:
          intNumGrade = txtInput.Text
          If intNumGrade >= 93 Then
            strLetGrade = "A"
          ElseIf intNumGrade >= 85 Then
            strLetGrade = "B"
          ElseIf intNumGrade >= 75 Then
            strLetGrade = "C"
          ElseIf intNumGrade >= 65 Then
            strLetGrade = "D"
          Else
            strLetGrade = "F"
          End If
          lblOutput.Caption = strLetGrade
          
        2. Extra Practice What can you think of to do to make this program better?


    14 09/26/05 Monday - Math (postponed), Cittone Guest Speaker
    1. Classroom Discussion -
      1. Guest speaker from Cittone at 9:00 and 11:00
      2. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
    2. Lab Assignment - Complete any incomplete work

    15 09/27/05 Tuesday - Computer Vocabulary, Boolean Logic, VB SELECT CASE Statement, "vbGrades3"
    1. Classroom Discussion -
      1. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      2. Definitions, from Dictionary.com:
        • Algebra - A branch of mathematics in which symbols, usually letters of the alphabet, represent numbers or members of a specified set and are used to represent quantities and to express general relationships that hold for all members of the set
        • The first origin of the word Algebra from faqts.com
        • Another origin of the word Algebra from algebra.com
        • A third origin of the word Algebra from wikipedia.org
        • George Boole (1815-1864) - British mathematician and logician who developed a calculus of symbolic logic
        • Boolean - Of or relating to a logical combinatorial system treating variables, such as propositions and computer logic elements, through the operators AND, OR, NOT, and XOR
        • Boolean Algebra - An algebra in which elements have one of two values and the algebraic operations defined on the set are logical OR, a type of addition, and logical AND, a type of multiplication
        • John Venn (1834-1923) - English logician who introduced Venn diagrams
        • Venn Diagram - A diagram using circles to represent sets, with the position and overlap of the circles indicating the relationships between the sets
      3. Links:
      4. Review Chapter 7 from Free-Ed.Net on Visual Basic, "Making Decisions"
      5. The VB SELECT CASE Statement:
        • Simpler way to write a multi-decision, multi-choice process
        • Syntax - one value each:
          Select Case Expression1
             Case value1
                One or more Visual Basic statements A
             Case value2
                One or more Visual Basic statements B
             [Case value3
                One or more Visual Basic statements C]
             [Case Else
                One or more Visual Basic statements D]
          End Select
          
        • Expression1 is a variable
        • IF expression1 is equal to value1 THEN statements A are performed
        • IF expression1 is equal to value2 THEN statements B are performed
        • IF expression1 is equal to value3 THEN statements C are performed
        • IF expression1 is equal to none of the values THEN statements D are performed
        • Alternate Syntax - uses < and > symbols:
          Select Case Expression2
             Case Is Relation1:
               One or more Visual Basic statements A
             Case Is Relation2:
               One or more Visual Basic statements B
             [Case Is Relation3:
               One or more Visual Basic statements C]
             [Case Else:
               One or more Visual Basic statements D]
          End Select
          
        • IF expression2 is greater or less than (depending on the symbol used) relation1 THEN statements A are performed
        • IF expression2 is greater or less than (depending on the symbol used) relation2 THEN statements B are performed
        • IF expression2 is greater or less than (depending on the symbol used) relation3 THEN statements C are performed
        • IF expression2 is greater or less than (depending on the symbol used) none of the relations THEN statements D are performed
        • Alternate Syntax - give a range start to end:
          Select Case Expression3
             Case value1 To value2:
                One or more Visual Basic statements A
             Case value3 To value4:
                One or more Visual Basic statements B
             [Case value5 To value6:
                One or more Visual Basic statements C]
             [Case Else:
                One or more Visual Basic statements D]
          End Select
          
        • IF expression3 is between start value1 and end value2 THEN statements A are performed
        • IF expression3 is between start value3 and end value4 THEN statements B are performed
        • IF expression3 is between start value5 and end value6 THEN statements C are performed
        • IF expression3 is between none of the values THEN statements D are performed
        • SELECT CASE, used correctly, is a very powerful and easy-to-use programming technique
        • SELECT CASE can be much easier to write and understand than complex nested IF THEN ELSE statements
    2. Lab Assignment -
      1. Modify your existing Grades program using SELECT CASE to eliminate the nested IF THEN ELSE statements
        1. Open recent project name "vbGrades2.vbp"
        2. Remove the existing IF THEN logic
        3. Replace with SELECT CASE logic
        4. Test using the same numbers: 100, 95, 85, 75, 65, 55, 0
        5. Save frequently

    16 09/28/05 Wednesday - Career, Time-Value of Money, "vbMoney"
    1. Classroom Discussion -
      1. Career - Job Hunting
      2. Time-Value of Money, the rule of 72
    2. Lab Assignment -
      1. Create a VB program to view time-value of money Future-Value calculations:
        1. Future Value of a One-Time Deposit
        2. You need to know three things:
          • Starting Value - How much you're starting with
          • Interest Rate - How much the bank pays you to save your money with them
          • Length of Term - How long you're planning to save
        For your calculations:
        1. Use the VB IDE to help you place the variables in the function
        Some ideas:
        1. Open VB & create a new, standard.exe
        2. Save the form and project to your "My Documents/vb" folder as "frmMoney.frm" and "vbMoney.vbp"
        3. Add textboxes for input:
          1. Deposit
          2. Rate
          3. Term
          4. Value
        4. Add labels to identify all textboxes
        5. Add instructions to the user
        6. Add variables at the top of the program:
          1. dblDeposit
          2. dblRate
          3. dblTerm
          4. dblValue
          5. intMesRet
        7. Add command buttons:
          1. Calculate Future Value
          2. Exit
        8. Steps for the Calculate Future Value button:
          1. Test each input textbox for a positive value and then assign the value (use "Val(txtInput.text)") of the textbox to the variable
          2. Assign the result of the predefined Visual Basic function "FV" to the output variable
          3. Display the variable, formatted as currency, on the output label
        9. Add a command button and code and "cancel" for exit
        10. Save frequently
        11. Test and debug your program (call me for assistance). Use numbers that are easy to confirm. For example:
          Deposit Rate Term Value
          100 5 1 $105.12
          100 10 1 $110.47
          100 10 10 $270.70
          1000 10 40 $53,700.66
        12. Extra Practice Does savings pay off?

    17 09/29/05 Thursday - Science, DeVry, Save for a Goal, "vbMoney2"
    1. Classroom Discussion -
      1. Guest speaker from DeVry at 9:00 and 11:00
      2. Science:
      3. Visual Basic Pre-Defined Built-In Functions:
    2. Lab Assignment -
      1. Modify the time-value of money VB program to view Payment calculations:
        1. How much will you need to save each month to reach a certain value
        2. You need to know three things:
          • Future Value - How much you want to end up with
          • Interest Rate - How much the bank pays you to save your money with them
          • Length of Term - How long you're planning to save
        For your calculations:
        1. Use the VB IDE to help you place the variables in the function
        Some ideas:
        1. Open VB & create a new, standard.exe
        2. Save the form and project to your "My Documents/vb" folder as "frmMoney.frm" and "vbMoney.vbp"
        3. Add a new textbox for input:
          1. Final
        4. Add labels to identify the new textbox
        5. Add a new variables at the top of the program:
          1. dblFinal
        6. Add a new command button:
          1. Calculate Payment
        7. Steps for the Calculate Future Value button:
          1. Test the new input textbox for a positive value and then assign the value (use "Val(txtInput.text)") of the textbox to the variable
          2. Assign the result of the predefined Visual Basic function "PMT" to the output variable
          3. Display the variable, formatted as currency, on the output label
        8. Add a command button and code and "cancel" for exit
        9. Save frequently
        10. Test and debug your program (call me for assistance). Use numbers that are easy to confirm. For example:
          Final Rate Term Value
          1000 3 3 $26.58
          10000 3 5 $154.69
          20900 2.99 5 $323.38
          25000 3 5 $386.75
        11. Extra Practice When is it better to pay cash?

    18 09/30/05 Friday - Skills USA
    1. Classroom Discussion -
    2. Lab Assignment -

    19 10/03/05 Monday - English, VB Loops, "vbNumberLoops"
    1. Classroom Discussion -
      1. English - Ms. Gerrick will visit and discuss how to review and edit an instruction manual for software release
      2. Definitions:
        • Loop - A sequence of instructions that repeats either a specified number of times or until a particular condition is met
        • Iterate - To say or perform again
        • Iteration - The process of repeating a set of instructions a specified number of times or until a specific result is achieved
        • Infinite Loop - One that never terminates
        • Sentinel - One that keeps guard
      3. Usage:
        • Works with comparison tests, just like decisions
        • The six comparision operators (  <    >    =    <=    >=    <>  ) work just the same
        • The block of code continues being interpreted and executed as long as the comparison returns a TRUE result
        • When the comparison returns a FALSE result, the loop ends and the program continues with the first statement after the LOOP statement
        • It's possible to have a loop where the comparison test returns a FALSE the first time it's tested - the block of statements will never be executed
      4. Rules:
        • Sentinel Variable - The variable that will be tested as part of the comparison
        • Start - Initialize the sentinel variable to some value before the start of the loop
        • Test - The comparison test will determine if the block of statements in the loop execute
        • Change - Modify the value of the sentinel variable inside the loop block
      5. Warnings:
        • YOU MUST SAVE YOUR PROGRAM BEFORE TESTING A LOOP - if an infinite loop condition occurs, you may have to reset your computer and will lose any changes that have not been saved - REMEMBER
        • You'll get an infinite loop if the sentinel variable does not change to make the comparison FALSE
        • If you get an infinite loop, wait, Windows may detect it and display a message box saying you have a slow running program and asking if you want to abort it - answer yes
      6. Loop Safety:
        • You set it up during testing
        • Create a variable Dim intSafety As Integer
        • Before you start the loop, initialize intSafety = 50
        • Inside the loop, decrement intSafety = intSafety - 1
        • Inside the loop, test If intSafety < 0 Then display an exit message and End Sub
      7. VB Picture Box object - can display (print) multiple lines:
        picOutput.Print ("hello world") ' print string literal
        strOutput = "My name is Mike" ' initialize a variable
        picOutput.Print (strOutput) ' print a variable
        
      8. Chapter 8 from samsPublishing.com:
        • Syntax of the DO WHILE LOOP:
          Do While comparisontest1
             Block of one or more Visual Basic statements A
             Change the sentinel variable
          Loop
          
          DO WHILE will execute statements A while comparisontest 1 is TRUE - if FALSE the first time, statements A will never be executed
        • Lab on DO WHILE
        • Syntax of the DO UNTIL LOOP:
          Do Until comparisontest2
             Block of one or more Visual Basic statements B
             Change the sentinel variable
          Loop
          
          DO UNTIL will execute statements B until comparisontest 2 becomes TRUE - if TRUE the first time, statements B will never be executed
        • Lab on DO UNTIL
        • Syntax of the DO LOOP UNTIL:
          Do
             Block of one or more Visual Basic statements C
             Change the sentinel variable
          Loop Until comparisontest3
          
          Similar to the DO UNTIL execute statements C until comparison test 3 becomes TRUE - will always execute statements C at least once
        • Lab on DO LOOP UNTIL
        • Syntax of the FOR NEXT:
          For counterVar = startVal To endVal [Step incrementVal]
             Block of one or more Visual Basic statements D
             The sentinel variable (counterVar) changes automatically
          Next CounterVar
          
          Will execute statements D (endVal - startVal) times - if startVal is greater than endVal, will not execute statements D at all
        • Lab on FOR NEXT
    2. Lab Assignment -
      1. Edit the user manual you created for your Tic Tac Toe game
      2. On-screen practice with Picture Box object and print
        • Add a picture box object titled "picOutput", make it large
        • Display "Hello World" to the picture box object inside a command button event
        • Initialize a string variable and display the contents
        • Use "picOutput.Cls" inside another command button event to clear screen the picture box
      3. On-screen practice with VB loops:
        • Display a series of numbers from 1 to 10
        • Display odd numbers from 1 to 10
        • Display multiples of three (3,6,9,etc.)
        • Start number to represent where the user wants the loop to begin
        • Stop number to represent where the user wants the loop to end
        • Step number to represent how the user wants to skip (ie: 2 4 6 or 3 6 9 etc.)

    20 10/04/05 Tuesday - Computer Vocabulary, VB Loop Practice, "vbPrime", "vbFactorial" - Brick, Jackson, Lakewood - No School
    1. Classroom Discussion -
      1. Computer Vocabulary - Bellingham Public Schools
      2. Chapter 8 from samsPublishing.com:
      3. Review VB Loops
      4. Definitions:
        • Sum - an amount obtained as a result of adding numbers
        • Factorial - the product of all the positive integers from 1 to a given number
        • Prime - 1 positive integer not divisible without a remainder by any positive integer other than itself and one
      5. Visual Basic MOD - divide two numbers and return only the remainder as an integer
        5 mod 3 returns 2
        
        Useful to see if a number can be divided evenly by another number
        5 mod 2 returns 1 - odd
        6 mod 2 returns 0 - even
        
        Here is an example:
        intSentinel = 1
        Do While intSentinel < 25
            If intSentinel Mod 2 = 0 Then
                picOutput.Print (intSentinel & " is an even number")
            End If
            intSentinel = intSentinel + 1
        Loop
        
    2. Lab Assignment -
      1. Practice with loops - Modify your loop program for:
        • Display the sum of all numbers between user choice of start and stop
        • Display Factorial for the user choice
        • Display the prime numbers between user choice of start and stop

    21 10/05/05 Wednesday - Career, VB Loop Practice, "vbStars" - Jackson, Lakewood - No School
    1. Classroom Discussion -
      1. Career - 7 Steps to Get a Job:
      2. Chapter 8 from samsPublishing.com:
      3. Review VB Loops
    2. Lab Assignment -
      1. Create a new Visual Basic program to use loops to draw shapes with one character:
        • Open Visual Basic and create a new standard executable
        • Name the form "frmStars.frm" and the project "vbStars.vbp"
        • Add a large picture box object for output
        • Add a textbox object and label for to let the user specify how many
        • Add a textbox object and label for to let the user specify the symbol
        • Add a command button object to draw one symbol
        • Add a command button object to draw a row of how many symbols
        • Add a command button object to draw a box of how many symbols
        • Add a command button object to draw a right triangle of how many symbols
        • Add a command button object to draw a left-sided right triangle of how many symbols
        • Add a command button object to draw an isosceles triangle of how many symbols

    22 10/06/05 Thursday - Science, VB Loop Review, Quiz VB Decisions and Loops, "vbGCD"
    1. Classroom Discussion -
      1. Reminder - No School on:
        • Friday - October 7th - Teacher In-Service
        • Monday - October 10th - Columbus Day
        • Thursday - October 13th - Yom Kippur
      2. Chapter 8 from samsPublishing.com
      3. Review VB Loops
    2. Lab Assignment -
      1. Take the Visual Basic Quiz 2. Click the link and follow the instructions. You only get one chance - this is not "try until you score 100". Open notes, open internet, open VB IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student
      2. Quiz Part II - Design, write, create, test, run, and save a Visual Basic program to determine the Greatest Common Denominator between two input numbers. GCD is found by determining the highest number that divides evenly into both of the two input numbers. For instance:
        given num1 = 12 and num2 = 18 then gcd = 6
        given num1 = 12 and num2 = 21 then gcd = 3
        given num1 = 12 and num2 = 24 then gcd = 12
        given num1 = 12 and num2 = 28 then gcd = 4
        given num1 = 28 and num2 = 12 then gcd = 4
        
        Run a loop. Stop when you reach the smaller number. Keep track of whenever you find a number that divides evenly into both input numbers:
        • Call your form "frmGCD.frm" and your project "vbGCD.vbp"
        • Think before you start
          • What form objects will you use?
          • What variables will you use?
          • What processes will you use?
          • How do you determine a denominator?
          • How do you determine the greatest common denominator?
        • Test frequently
        • Save frequently
        • When complete, copy to your "H:/VB" folder so I can grade it
      3. Grading Criteria:
        1. Form must be named
        2. Form objects (except labels) must be named
        3. You must have your name, date, and program name as comments at the top of the code
        4. You must use "Option Explicit"
        5. Variables must be named and declared
        6. Exit button must ask if I really want to exit
        7. Determine button must provide the correct answer to all test input. I will test with the numbers given above
        8. Output must echo user input so that the user can see and fix his own misteaks
        9. Output must show the correct answer
        10. Use enough text in the output to describe what the numbers mean
        11. Open online book, open notes, you may ask clarification questions but I will not code this for you, you may NOT ask your fellow students for help
        12. Take as much time as you need to get it right
      4. If we have time, we'll complete the vbStars loop practice program from yesterday on the board together
      5. HAVE A GRAND WEEKEND!!!

    10/07/05 Friday - OCVTS School Closed - Teacher In-Service

    10/10/05 Monday - OCVTS School Closed - Columbus Day
    23 10/11/05 Tuesday - Computer Vocabulary, Boolean Logic in Programming, VB Loop Practice, "vbTimesTable"
    1. Classroom Discussion -
      1. Spanish Computer Terms - Recognize any?
      2. Review of quiz from last week
      3. Chapter 8 from samsPublishing.com:
      4. Review of VB Loops
      5. Boolean Logic in Programming
        NOT TRUE FALSE
        FALSE TRUE
        (make opposite)
           
        OR TRUE FALSE
        TRUE TRUE TRUE
        FALSE TRUE FALSE
        (ONE must be TRUE)
           
        AND TRUE FALSE
        TRUE TRUE FALSE
        FALSE FALSE FALSE
        (BOTH must be TRUE)
      6. Boolean Logic in Programming and PEMDAS
        1. Parenthesis
        2. AND is like Multiply
        3. OR is like Add
        4. The AND pair will compare before the OR pair
        5. To make the OR pair compare before the AND pair, you MUST USE PARENTHESIS!!!
      7. Boolean Logic in Programming Examples. Use NOT to reverse the logic:
        • NOT TRUE
        • NOT FALSE
        • NOT intMesRet = vbNo
        • NOT strQuitGame = vbYes
        Use OR to compare two possible answers to the same variable:
        • strDirection = "up" OR strDirection = "down"
        • strAnswer = "YES" OR strAnswer = "yes"
        • intAge = 17 OR intAge <> 17
        • strHaveCar = "Y" OR strHaveCar = "y"
        • dtmDay = "Saturday" OR dtmDay = "Sunday" OR blnHoliday = TRUE
        • isNumeric(txtNum1.text) OR isNumeric(txtNum2.text)
        • strHaveCar = "Y" OR strHaveRide = "Y" OR strBusRide = "Y"
        • strTrafficLight = "Yellow" OR strTrafficLight = "Red" or strTrafficSign = "Stop"
        • strTrafficLight = "Red" OR blnCarInFrontOfYou = TRUE
        Use AND to compare two possible answers to different variables:
        • strDirection = "up" AND strAnswer = "yes"
        • strAnswer = "YES" OR strAnswer = "yes"
        • intAge >= 17 AND strHaveCar = "Y"
        • dtmDay = "Monday" AND blnHoliday = TRUE
        • isNumeric(txtNum1.text) AND isNumeric(txtNum2.text)
        • strTrafficLight = "Yellow" AND blnJustTurnedYellow = FALSE
        • strTrafficLight = "Yellow" AND intTurnedYellowSeconds > 5
        • strTrafficLight = "Green" AND blnCarInFrontOfYou = FALSE
        • cmdTopLeft <> "" AND cmdTopLeft = cmdTopCenter AND cmdTopCenter = cmdTopRight
        Use complex logic and PEMDAS to compare different combinations of answers:
        • strHaveCar = "Y" AND strHaveLicense = "Y" OR strBusRide = "Y"
        • blnSchoolOpen = TRUE AND strHaveRide = "Y" OR strBusRide = "Y"
        • blnSchoolOpen = TRUE AND (strHaveRide = "Y" OR strBusRide = "Y")
    2. Lab Assignment -
      1. Finish "vbStars.vbp" from Wednesday
      2. Create a Visual Basic program to display a times table chart. Give the user the option of starting and stopping at different numbers. Give the user the choice of a multiplier. Sample output for start number 5, stop number 9, and multiplier 2:
        5 times 2 is 10
        6 times 2 is 12
        7 times 2 is 14
        8 times 2 is 16
        9 times 2 is 18
        • Open Visual Basic and create a new executable
        • Name the form "frmTimesTable.frm" and the project "vbTimesTable.vbp", saved to your documents VB folder
        • Always add labels to identify any input text boxes
        • Add variables:
          Option Explicit
          Dim intMesRet As Integer ' message box return variable
          Dim intStartNum As Integer ' number to start at
          Dim intStopNum As Integer ' number to stop at
          Dim intMultiplier As Integer ' number to multiply by
          Dim intProduct As Integer ' answer from multiply by
          Dim intRows As Integer ' a loop control sentinel variable
          Dim intCols As Integer ' another loop control sentinel variable
          
        • Add a command button "cmdExit" and logic to exit
        • Add textboxes for start number "txtStartNum", stop number "txtStopNum", and multiplier "txtMultiplier"
        • Add a picture box for output
        • Add a command button "cmdList" to display a times table list
        • Double-click the command button to open the code window and a sub-routine "cmdList_Click()"
        • Clear the output picture box
        • Test each textbox, if numeric, change to value and assign to the correct variable
        • Build a loop, start at the start number and stop at the stop number
        • Inside a loop, get the product by multiplying the sentinel variable by the multiplier and display the output to the picture box
        • Save frequently
        • Test
      3. Modify the "vbTimesTable.vbp" Visual Basic program to draw a table in addition to a list. Use numbers across the top and down the side. Display the product of the two numbers in a table in between. For example:
        1 2 3
        1 1 2 3
        2 2 4 6
        3 2 6 9
        • Add a command button "cmdTable"
        • Double-click the command button to open the code window and a sub-routine "cmdTable_Click()"
        • Test each textbox, if numeric, change to value and assign to the correct variable
        • Use a loop to display the header row from start number to stop number. Use "intCols" as your sentinel variable. Use the semi-colon character to stay on the same line of output:
          picOutput.Print "  " & intCols;
          
        • Print nothing to move to a new line after the loop ends
        • Use another loop for each row, start at the start number and stop at the stop number. Use "intRows" as your sentinel variable in the first "outside" loop
        • Inside this first "outside" loop, display the row number. Then you need a second "inside" loop to display columns. Use "intCols" as your sentinel variable in the second "inside" loop
        • Inside the second loop, get the product by multiplying the sentinel variable by the multiplier and display the output
        • Use the semi-colon character to stay on the same line of output:
          picOutput.Print "  " & intRows;
          picOutput.Print " " & intProduct;
          
        • End the second "inside" "intCols" loop
        • Print nothing to move to a new line after the second "inside" "intCols" loop ends
        • End the first "outside" "intRows" loop
        • Go back and use blank spaces to line up the output numbers
        • Save frequently
        • Test

    24 10/12/05 Wednesday - Career, VB Loop Practice
    1. Classroom Discussion -
      1. Career - College-Bound High School Senior Planning Calendar
      2. Chapter 8 from samsPublishing.com:
      3. Review of Boolean Logic in Programming
    2. Lab Assignment -
      1. Complete vbStars and vbTimesTable

    10/13/05 Thursday - OCVTS School Closed - Yom Kippur
    25 10/14/05 Friday - Skills USA, PDP, Review, Quiz
    1. Classroom Discussion -
      1. Chapter 8 from samsPublishing.com:
      2. Review of Boolean Logic in Programming
    2. Lab Assignment -
      1. Take the Boolean Logic Quiz. Click the link and follow the instructions. You only get one chance - this is not "try until you score 100". Open notes, open internet, open VB IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student
      2. Complete vbStars and vbTimesTable

    26 10/17/05 Monday - English, Sub-Routines, VB Sub-Routine Practice, "vbSubDemo"
    1. Classroom Discussion -
      1. Definitions:
        • Algorithm - A step-by-step problem-solving procedure, especially an established, recursive computational procedure for solving a problem in a finite number of steps
        • Pseudocode - A notation resembling a programming language but not intended for actual compilation
      2. Sites:
      3. Chapter 13 from samsPublishing.com
        • What benefits structured programming offers
        • Why short, numerous procedures beat long procedures
        • How to write your own functions and subroutines
        • When to use functions
        • How to code argument lists
        • Why VB uses two argument-passing methods
        • How to protect passed arguments
    2. Lab Assignment -
      1. Onboard demo and practice with sub-routines

    27 10/18/05 Tuesday - Computer Vocabulary, Sub-Routines Cont'd, VB Sub-Routine Practice, "vbPayroll", "vbGrades", "vbTicTacToe"
    1. Classroom Discussion -
      1. French Computer Terms - Recognize any?
      2. Chapter 13 from samsPublishing.com, cont'd
    2. Lab Assignment -
      1. Onboard practice, re-write the vbPayroll, vbGrades, and vbTicTacToe programs to use sub-routines

    28 10/19/05 Wednesday - Career, Sub-Routines Cont'd, VB Sub-Routine Practice, "vbDistanceConvertor"
    1. Classroom Discussion -
      1. Career assessment from LiveCareer.com - signup, take the assessment, print out, put you name on, and hand in the chart. Remember - don't pay for stuff on the internet and don't sign up for any advertizements
      2. Definitions:
        • Procedure - An ordered set of tasks for performing some action
        • Routine - A section of a program that performs a particular task
        • Subroutine - A set of instructions that performs a specific task for a main routine, requiring direction back to the proper place in the main routine on completion of the task
        • Function - A named section of a program that performs a specific task
        • The terms routine, procedure, function, and subroutine are synonymous
        • Synonymous - Having the same or a similar meaning
        • Some programming languages (Visual Basic) make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value
      3. Chapter 13 from samsPublishing.com, cont'd
      4. Examples:
        ' Subroutine calling statement
        Call getNormalPay()
        
        ' Subroutine called statement
        Private Sub getNormalPay()
        sngGrossPay = sngHoursWorked * sngPayRate
        End Sub
        
        ' Function calling statement
        sngGrossPay = getNormalPay()
        
        ' Function called statement
        Private Function getNormalPay() As Single
        getNormalPay = (sngHoursWorked * sngPayRate)
        End Function
        
    2. Lab Assignment -
      1. Onboard practice, modify vbDistanceConvertor to:
        1. Change label captions
        2. Use functions
        3. Pass arguments to one function

    29 10/20/05 Thursday - Technical Movie - Mr. Clarke at Conference
    1. Classroom Discussion -
      1. Watch movie
    2. Lab Assignment -
      1. Complete movie review form

    30 10/21/05 Friday - Technical Movie - Mr. Clarke at Conference
    1. Classroom Discussion -
      1. Watch movie
    2. Lab Assignment -
      1. Complete movie review form

    31 10/24/05 Monday - Math, Movie Review, VB Functions, "vbPower" - Spirit Week - Neck-up Dress-up Day
    1. Classroom Discussion -
      1. Did you enjoy the moview? What technology was involved in the movie plot? How has the technology changed since the movie was filmed?
      2. Ms. Verde will discuss exponentiation, raising a number to a power
      3. Chapter 13 from samsPublishing.com, cont'd
    2. Lab Assignment -
      1. Create a Visual Basic program "vbPower.vbp" to raise a number to a power:
        • Write the pseudocode or flowchart
        • Create the form
        • Write the code for exit
        • Test:
          number power answer
          3 3 27
          8 2 64
          2 8 256
          5 4 625
          4 5 1024
        • Save frequently

    32 10/25/05 Tuesday - Vocabulary, VB Functions, "vbNames" - Spirit Week - Sports Day
    1. Classroom Discussion -
      1. Why are you here? Why am I here?
      2. Visual Basic Listbox Object
      3. Chapter 10 from samsPublishing.com, cont'd
    2. Lab Assignment -
      1. Create a Visual Basic program "vbNames.vbp" to work with the Listbox object
        • Add a command button and code to exit
        • Add a listbox object "lstNames"
        • Add a command button to accept a name as input from the user and add it to the listbox "lstNames.AddItem strItemName"
        • The input may not be blank
        • The input may not contain spaces
        • After adding the item to the listbox, clear the input and set the focus "lstNames.Clear"
        • Add a command button to clear all names from the listbox "lstNames.Clear". Include a message box to confirm
        • For testing, add a command button to add a series of 10 predeterimined-names
        • Add a command button to accept a number from the user and display only that item from the listbox in a message box "lstNames.List(intIndex)"
        • The input may not be blank, must be a number, and must be the correct size, don't accept a number greater than the number of items in the list "lstNames.ListCount", give an error message instead
        • After displaying the item from the listbox, clear the input and set the focus
        • Test and save frequently
      2. Modify the Listbox program to include a list of passwords
        • Add a password input textbox
        • Both name and password may not be empty when adding
        • Display command button must display both name and password
        • Clear command button must clear both name and password listboxes

    33 10/26/05 Wednesday - Career, VB Functions, "vbStates" - Spirit Week - Backwards Day
    1. Classroom Discussion -
      1. Career - U.S. Federal Bureau of Labor Statistics website. The Bureau of Labor Statistics (BLS) is the principal fact-finding agency for the Federal Government in the broad field of labor economics and statistics
      2. Visual Basic Combobox Object
      3. Chapter 10 from samsPublishing.com, cont'd
      4. Reading from a text file:
        • Must be in the same folder (save, close, open your VB project)
        • Name the file, close any open files, ensure the file exists and has data, open the file, like this:
          strFileName = "states.txt"
          Close ' close any open files
          If LenB(Dir$(strFileName)) Then ' file has depth
          Open strFileName For Input As #1 ' open the file
          
    2. Lab Assignment -
      1. Create a Visual Basic program "vbStates.vbp" to list all 50 U.S. states in a Combobox:
        • Create a text file with the names of all 50 U.S. states (Google search and copy)
        • Add a command button and code to exit
        • Add a combo box "cboStates" to contain the list of the states
        • On Form_Load(), open the text file containing the list of the states and load all the states into the combobox:
          Do While Not EOF(1)
          	Line Input #1, strLine
          	cboStates.AddItem strLine
          Loop
          
        • Test and save frequently
      2. Modify the states program to include state capitals:
        • Create a text file with the names of all 50 U.S. state capitals (Google search and copy)
        • Add a combox "cboCapitals"
        • Load the state capitals on Form_Load()
        • Add a command button "cmdCapital" to display the state capital for the selected state
        • If the user has selected a state, locate the appropriate capital and display both
        • Test and save frequently

    34 10/27/05 Thursday - Science, VB Functions, "vbStates" - Spirit Week - Twin Day
    1. Classroom Discussion -
      1. How Stuff Works Electronic Payment
      2. Visual Basic option buttons, also called radio buttons, in chapter 10 from samsPublishing.com
    2. Lab Assignment -
      1. Finish our Visual Basic States Capitals game from yesterday to make it more game-like. Pseudocode:
        • Start the game with both combo box objects invisible
        • Use option buttons to let the user control which game to play: guess capitals or guess states
        • Add a frame object with the caption "Choose Game"
        • Draw an option button named "optGuess" inside the frame
        • Copy the option button, Click on the frame, Paste another option button, CREATE A CONTROL OBJECT
        • The first option button is now named "optGuess(0)" and the second is named "optGuess(1)" - this is how you tell them apart
        • Set the caption for the first option button to "Guess Capital" and the second caption to "Guess State"
        • Create a new global variable "strGame" as String
        • Double-Click one of the option buttons
        • To the new sub-routine "Private Sub optGuess_Click(Index As Integer)" add these lines:
          If Index = 0 Then ' user wants to guess capital
              cboStates.Visible = True ' show the states combo box
              cboCapitals.Visible = False ' hide the capital combo box
              strGame = "States" ' user wants to guess capital
          Else ' user wants to guess state
              cboStates.Visible = False ' hide the states combo box
              cboCapitals.Visible = True ' show the capital combo box
              strGame = "Capitals" ' user wants to guess state
          End If
          
        • Modify the "cmdGuess" command button code:
          lblAnswer.Caption = "" ' clear the contents of the output label
          If strGame = "States" Then ' if user wants to guess capital
              If cboStates.ListIndex >= 0 Then ' if user has clicked on a state
                  lblAnswer.Caption = "The capital of " & cboStates.List(cboStates.ListIndex) _
                      & " is " & cboCapitals.List(cboStates.ListIndex)
              End If
          Else
              If cboCapitals.ListIndex >= 0 Then ' if user has clicked on a capital
                  lblAnswer.Caption = cboCapitals.List(cboCapitals.ListIndex) _
                      & " is the capital of " & cboStates.List(cboCapitals.ListIndex)
              End If
          End If
          
      2. Modify the State Capitals game to make it more game-like. Add a guessing segment by displaying both combo boxes and letting the user click both to see if they match. Pseudocode:
        • New variables: "strCapitalPick" and "strCapitalReal"
        • Copy and paste into the frame one of the two existing option buttons. You already have a control array, so VB won't ask if you want to create one
        • Change the caption of the new button to "Play Game"
        • Copy and paste the "cboCapitals" combo box but do not create a control array, new name "cboCapitalsSorted", and set the sorted property to "True"
        • In the "Form_Load()" sub-routine, set the new combo box to invisible
        • Modify the "optGuess_Click()" sub-routine code to include the new button:
          • Show the states combo box
          • Hide the original capitals combo box
          • Show the new capitals sorted combo box
          • Set strGame = "Both"
          Now, two combo boxes show, "cboStates" and "cboCapitalSorted"
        • Modify the "cmdGuess_Click()" sub-routine code to include the new option:
          • If both "cboStates.ListIndex" and "cboCapitalsSorted.ListIndex" have been clicked (greater than zero) then continue
          • Save "cboCapitalsSorted.List(cboCapitalsSorted.ListIndex)" into "strCapitalPick"
          • Save "cboCapitals.List(cboStates.ListIndex)" into "strCapitalReal"
          • If "strCapitalPick" is the same as "strCapitalReal" display a winning message
          • Otherwise display a losing message with the correct answer
        • Experiment with changing background and foreground colors for correct or incorrect answers - Google search if you need to
        • If you change colors to vbRed and vbYellow, how would you change back to vbBlack and gray? (there is no vbGray)

    35 10/28/05 Friday - Skills USA, VB Quiz, "vbAreaPerimeter" - Spirit Week - Flashback Day
    1. Classroom Discussion -
      1. Daylight Saving Time
      2. PDP Intro
      3. VB Quiz in lab
    2. Lab Assignment -
      1. Take the Visual Basic Quiz 3. Click the link and follow the instructions. You only get one chance - this is not "try until you score 100". Open notes, open internet, open VB IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student
      2. Quiz Part II - Design, write, create, test, run, and save a Visual Basic program to display the area and perimeter of a rectangle. Area is found by multiplying the height by the width. Perimeter is found by the sum of twice the height plus twice the width. Form Design:
        • 2 input text boxes: one for height, one for width
        • A label with instructions
        • 1 or 2 labels for the answers
        • Labels to identify all text boxes and any output labels
        • 2 command buttons: one for exit, one for calculate
        Pseudocode:
        • Declare variables for height and width and area and perimeter
        • When the user clicks on exit, unload me
        • When the user clicks on calculate, calculate the area and perimeter and display the values
        • If the two input text boxes are numeric, convert the values and save into height and width variables
        • Multiply height times width and put the answer into area
        • Add height plus height plus width plus width and put the answer into perimeter
        • Display both answers on the form
        Finishing Up:
        • Test with the numbers given
          Height Width Area Perimeter
          3 4 12 14
          4 5 20 22
          5 5 25 20
        • Save as "frmArea.frm" and "vbArea.vbp" to a folder named "vbArea"
        • If rectangle is a square, display some message saying so
        • If you have time remaining, make the form look good - colors - font face and size - object placement - organization
        • When all complete, copy the folder to your "H:/vb/" folder so I can grade it
        Grading (total of 100 pts available):
        • Must give correct answers (75 pts)
        • Must use Option Explicit (5 pts)
        • Must use correct object and variable naming conventions (txtSomething and intSomething) (5 pts)
        • Must have at least one programmer-written function or sub-routine (5 pts)
        • Must have author name, program name, and date written as comments (5 pts)
        • Must look good (5 pts)

    36 10/31/05 Monday - Happy Halloween - Vocabulary, VB Option Buttons, "vbQuotes", mod "vbTicTacToe" - Spirit Week - Costume Day
    1. Classroom Discussion -
      1. End of Marking Period 1 - 12 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Review of Friday's Programming Evaluation:
        • Must be on "H:/VB/" folder in order for me to grade
        • Save as "frmArea.frm" and "vbArea.vbp" to a folder named "vbArea"
        • If rectangle is a square, display some message saying so
        • Must give correct answers (75 pts)
        • Must use Option Explicit (5 pts)
        • Must use correct object and variable naming conventions (txtSomething and intSomething) (5 pts)
        • Must have at least one programmer-written function or sub-routine (5 pts)
        • Must have author name, program name, and date written as comments (5 pts)
        • Must look good (5 pts)
      4. Computer and Technology Vocabulary
      5. Visual Basic option buttons, also called radio buttons, in chapter 11 from samsPublishing.com
    2. Lab Assignment -
      1. Create a Visual Basic program giving control to the user. Today we'll be using loads of option buttons:
        Pseudocode:
        • Name: "vbQuotes"
        • Add an "Exit" command button object to allow the user to exit
        • Add a label object "lblQuote" to display a quote from music, movie, or television
        • Add a "Change" command button object to allow the user to change the quote
          • Find 5 quotes online
          • Use a variable to display 1 of the 5 quotes
          • Add 1 to the quote variable
          • If quote variable is greater than 5, make it 1
          • Use the quote variable to determine which quote to display
          • Display the quote on the label
        • Save & Test
        • Add 6 option (radio) button objects to allow the user to change the label background color
          • Add a frame object named "frmBackColor" with the caption "Back Color"
          • Draw an option button object named "optBackColor" onto the frame do not double click
          • Copy the option button, click on the frame, paste and create a control array
          • Repeat until you have 6 option buttons on the frame
          • Change the captions to "Red", "Green", "Blue", "Yellow", "Magenta", and "Cyan"
          • Double-Click on one of the option buttons
          • Add code so that when the user clicks on one, change the label backColor property to the correct color
        • Save & Test
        • Add another frame "frmTextColor" and 6 more option button objects to change the label foreColor property
        • Save & Test
        • Add another frame "frmFontName" and 12 ro so option button objects to change the label fontName property
        • Save & Test
      2. Modify your TicTacToe game to use option button objects to allow the user to choose who plays first
      3. Complete any unfinished assignments

    37 11/01/05 Tuesday - English, VB Check Boxes, "vbQuotes", mod "vbGrades"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 11 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Ms. Gerrick will visit and work with us on reading and comprehension, very important to technology people because our users speak a different language and don't always know how to ask for what they want, we as computer technology people, have to be able to understand and sometimes translate
      4. Visual Basic check boxes in chapter 11 from samsPublishing.com
    2. Lab Assignment -
      1. Modify your "vbQuotes" project to allow the user more control by using loads of check boxes
        • Hide the label object quote on startup
        • Add a checkbox object "chkShowQuote"
        • Add code to the checkbox if the box is checked then show the quote, test the checkbox value property for vbChecked, if true, change the "lblQuote.visible" property to True, else, change the "lblQuote.visible" property to False
        • Save & Test
        • Add a checkbox and code for making the "lblQuote.fontBold" property true or false
        • Save & Test
        • Add a checkbox and code for making the "lblQuote.fontItalic" property true or false
        • Save & Test
        • Add a checkbox and code for making the "lblQuote.fontUnderline" property true or false
        • Save & Test
        • Add a checkbox and code for making the "frmBackColor.visible" property true or false
        • Save & Test
        • Add a checkbox and code for making the "frmTextColor.visible" property true or false
        • Save & Test
        • Add a checkbox and code for making the "frmFontName.visible" property true or false
        • Save & Test
      2. Modify your grades program to add a checkbox object to allow the user to choose whether to show lettergrade and gpa or only lettergrade
      3. Complete any unfinished assignments

    38 11/02/05 Wednesday - Career, VB Scrollbars, "vbQuotes", mod "vbTemperature" and/or "vbDistanceConverter"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 10 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Review learning styles from Chaminade College Preparatory School
      4. Visual Basic scrollbars in chapter 11 from samsPublishing.com
    2. Lab Assignment -
      1. Take both of the following online learning styles assessments and write down your learning styles
        • University of Arizona
        • LDpride
        • Record your answers in a table like this:
          ArizonaU LDPride
          Visual    
          Auditive    
          Kinestetic    
        • Now that you know how you learn best, will you change the way you study?
      2. Modify your "vbQuotes" project to allow the user more control by using loads of scrollbars
        • Add a horizontal scrollbar "hsbTextSize" (if you add a vertical scrollbar "vsbTextSize")
        • Set the scrollbar minimum property to 8 and the maximum property to 32
        • Set the scrollbar smallChange property to 2 and the largeChange property to 8 and the value property to 12
        • Write the code on change to set the "lblQuote.fontSize" equal to the "hsbTextSize.value"
        • Save & Test
        • Add a scrollbar "hsbJustify" min = 0, max = 2, smallChange = 1, largeChange = 1, value = 0, and code to change "lblQuote.Alignment"
        • Save & Test
        • Add a scrollbar "hsbVisible" min = 0, max = 1, smallChange = 1, largeChange = 1, value = 0, and code to change "lblQuote.visible" True or False and "chkShowQuote.value" to the same as the scrollbar value
        • Save & Test
        • Add a scrollbar "hsbQuote" min = 0, max = 8, smallChange = 1, largeChange = 1, value = 0, and code to change "lblQuote.caption" to the correct quote and be sure to change the quotenumber variable
        • Save & Test
      3. Modify your distance and/or temperature converter programs to use scrollbars to input the distance or temperature
      4. Complete any unfinished assignments

    39 11/03/05 Thursday - Science, VB Timers, "vbQuotes", mod "vbTrafficLight"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 9 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. How SMS Works
      4. Visual Basic timers in chapter 11 from samsPublishing.com
    2. Lab Assignment -
      1. Modify your "vbQuotes" project to allow the user more control by using timers
        • Add a timer object named "tmrQuote" that will automatically change the quote after a set amount of time has expired
        • Set the timer interval to 5000 ticks
        • Write the code for the timer object to call the next quote command button when the time expires
        • Save & Test
        • Change the timer enabled property to False
        • Add a checkbox object "chkTimer" and code to enable the timer when checked
        • Save & Test
        • Add a variable "intTimer" started at 5 that will count down to changing the quote
        • Add a label "lblTimer" to display the "intTimer"
        • Change the timer interval to 1000 ticks
        • Change the code inside the timer object to test the value of "intTimer", if intTimer <= 0 then call the next quote command button and set "intTimer" back to 5, else decrement "intTimer"
        • Save & Test
      2. Modify your "vbLight" traffic light program to automatically change the lights, say 20 seconds red, 15 seconds green, and 5 seconds yellow
      3. Complete any unfinished assignments

    40 11/04/05 Friday - PDP, SkillsUSA, VB Weekly Review, "vbImageDisplayer2"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 8 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. PDP - Level 1.1 - Self Assessment
      4. Week Review VB option buttons, check boxes, scrollbars, & timers
      5. Visual Basic additional controls in chapter 11 from samsPublishing.com
    2. Lab Assignment -
      1. Create a VB program "vbImageDisplayer2" to display a series of images using an image, a timer, a scrollbar, and a checkbox:
        • Open VB, make a new executable, name the form, save into a folder, and close VB
        • Open Windows Explorer ("My Documents" or "My Computer"), browse to the folder, and open the project by double-clicking
        • Add and code an Exit command button object
        • Add an image or picture object to display your images
        • Search for and copy up to 10 images off the internet and save them into the correct folder
        • Add and code a timer object to control switching the image automatically
        • Add and code a scrollbar object to control the timer interval, how long an image is displayed before it switches
        • Add and code a checkbox object to control whether the timer is enabled True or False
        • Add and code a label object to display the name of the current displayed image
        • Save and test
        • Copy to your "H:/VB/" folder so I may look at it
      2. Complete any unfinished assignments

    41 11/07/05 Monday - Math, "vbOhmsLaw", "vbPong"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 7 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Math - with Ms. Verde - Ohm's Law pie chart and java applet lightbulb circuit
      4. Complete Lab 1, "vbOhmsLaw"
      5. Visual Basic moving an object on the screen while the program is running
      6. Visual Basic animating pictures in chapter 18 from samsPublishing.com
      7. Work on Lab 2, "vbPong"
    2. Lab Assignment -
      1. Create a Visual Basic program "vbOhmsLaw":
        • Open Visual Basic and create a new executable
        • Name the form "frmOhmsLaw" and name the project "vbOhmsLaw"
        • Design the form to let the user input 2 numbers
        • Design the form to let the user choose which calculation to use
        • Process the correct calculation(s) and display the answer(s)
        • Save & Test
        • Copy to your "H:/VB" folder so I may grade it
      2. Create a Visual Basic program "vbPong". Create a moving object by changing its top and/or left properties inside a timer object. Our moving object is going to move within the boundaries of the form, so we can use the form properties Top, Left, Height, & Width:
        • Open Visual Basic and create a new executable
        • Name the form "frmPong" and name the project "vbPong"
        • Make the form big - like Height=8000 & Width=10000
        • Find an image of a ball from the Internet, copy & save to the folder as "ball.jpg" or "ball.gif"
        • Add an Image object "imgBall" & set properties: Height=1000 & Width=1000 & Picture="ball.jpg" or "ball.gif"
        • On form_load, set the position of the ball at Top=1000 & Left=1000
        • Add variables to control ball movement: "blnBallMoveDown" & "blnBallMoveRight" & "intMoveSize"
        • In the form_load, set variables to "True" & "True" & 200
        • Add variables to control ball bounce: "intLeftEdge" & "intRightEdge" & "intTopEdge" & "intBottomEdge"
        • In the form_load, set variables to 1 & "frmPong.Width - 1400" & 1 & "frmPongHeight - 1600"
        • Add a Timer object "tmrBallMove" & set properties: Interval=200
        • Write code in the timer to change direction of ball:
          If imgBall.Left > intRightEdge Then blnBallMoveRight = False
          If imgBall.Left < intLeftEdge Then blnBallMoveRight = True
          If imgBall.Top > intBottomEdge Then blnBallMoveDown = False
          If imgBall.Top < intTopEdge Then blnBallMoveDown = True
          
        • Save & Test
        • Write code in the timer to move the ball by changing the top and left property:
          Select Case blnBallMoveRight
              Case 0: imgBall.Left = imgBall.Left - intMoveSize
              Case 1: imgBall.Left = imgBall.Left + intMoveSize
          End Select
          Select Case blnBallMoveDown
              Case 0: imgBall.Top = imgBall.Top - intMoveSize
              Case 1: imgBall.Top = imgBall.Top + intMoveSize
          End Select
          
        • Save & Test
      3. Complete any unfinished assignments

    42 11/08/05 Tuesday - Computer Vocabulary, "vbMadLibs", "vbPong"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 6 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Visual Basic string functions in chapter 14 from samsPublishing.com
      4. Work on Lab 1, "vbMadLibs"
      5. Work on Lab 2, "vbPong"
    2. Lab Assignment -
      1. Create a Visual Basic program "vbMadLibs:"
        • Create a new Visual Basic executable "frmMadLibs" & "vbMadLibs"
        • Add a command button object and code for exit
        • Add 5 textboxes objects for user input of words
        • Add 6 string variables for your story
        • In the form_load, create a story with holes and initialize the 6 string variables
        • Add a label object for output
        • Add a command button object to write your story
        • Write the code to display your story with the text from the 5 textboxes inserted into the holes in your story
        • Display onto your output label caption
        • Save & Test
      2. Modify the Visual Basic program "vbPong:"
        • Open "vbPong"
        • Draw a line object "linLeft" to be the left paddle & set properties BorderWidth=10, X1=200, Y1=200, X2=1000, Y2=2000
        • Draw a line object "linRight" to be the right paddle & set properties BorderWidth=10, X1=9600, Y1=9600 X2=1000, Y2=2000
        • Double-click on the form and change the procedure to "KeyPress"
        • Code to check which key was pressed and move the left or right line:
          • w is 119, if KeyAscii = 119, move the left paddle up, increment linLeft.Y1 & Y2 by 200
          • s is 115, if KeyAscii = 119, move the left paddle down, decrement linLeft.Y1 & Y2 by 200
          • i is 105, if KeyAscii = 119, move the right paddle up, increment linRight.Y1 & Y2 by 200
          • k is 107, if KeyAscii = 119, move the right paddle down, decrement linRight.Y1 & Y2 by 200
          • escape is 27, if KeyAscii = 27, end the program
          • return is 13, if KeyAscii = 13, start the ball
        • Save & Test
        • Code also to not let either paddle leave the playing field:
          • if linLeft.Y1 < intTopEdge put Y1 back at intTopEdge and & Y2 1000 greater
          • if linLeft.Y1 > intBottomEdge put Y2 back at intBottomEdge & put Y1 1000 less
          • if linRight.Y1 < intTopEdge put Y1 back at intTopEdge & put Y2 1000 greater
          • if linRight.Y1 > intBottomEdge put Y2 back at intBottomEdge & put Y1 1000 less
        • Save & Test
      3. Complete any unfinished assignments

    43 11/09/05 Wednesday - Career, "vbMadLibs", "vbPong"
    1. Classroom Discussion -
      1. End of Marking Period 1 - 5 days left
      2. Check your grades - if you haven't completed an assignment, you may complete it this week
      3. Career - Key steps to getting a job - view the career page
      4. Visual Basic online text from samsPublishing.com
      5. Complete Lab 1, "vbMadLibs"
      6. Complete Lab 2, "vbPong"
    2. Lab Assignment -
      1. Modify the Visual Basic program "vbMadLibs:"
        • Modify the Visual Basic program "vbPong:"
          • Open "vbPong"
          • Modify ball movement so that if it hits a paddle it bounces
          • Save & Test
          • Add some variables and labels for keeping and displaying score
          • Initialize the variables to 0 in the form_load
          • Display the variables to the label captions
          • If the ball hits the left wall, give the right player 1 point
          • If the ball hits the right wall, give the left player 1 point
          • Save & Test
          • Determine and display a winner if one player reaches 5 points
          • Ask it replay and either exit or restart by calling form_load
          • Save & Test
        • Complete any unfinished assignments

      11/10/05 Thursday - OCVTS School Closed - NJEA Convention
      11/11/05 Friday - OCVTS School Closed - NJEA Convention & Veterans' Day

      44 11/14/05 Monday - English, VB Practice: "vbMadLibs", "vbVolumeConverter"
      1. Classroom Discussion -
        1. End of Marking Period 1 - 4 days left
        2. Check your grades - if you haven't completed an assignment, you may complete it this week
        3. MATES mid-term exams - please be respectful and quiet
        4. English:
          1. Fractured English - mamarocks - Engrish in other countries
          2. Fractured English - egreely.com - Angleish in other countries
          3. Fractured English - msu.edu - Inglish in other countries
          4. Fractured English - ozjokes.com - Engleesh in other countries
        5. Array Variables - 1 variable name with many values - chapter 10.3 from samsPublishing.com - Sams calls these "Data Arrays"
        6. Visual Basic online text from samsPublishing.com
      2. Lab Assignment -
        1. Create a Visual Basic Program "vbMadLibs":
          1. Create a new Visual Basic executable
          2. Add a command button object and code to Exit
          3. Add a large picture box object "picOutput"
          4. Add a command button object and code to clear the picture box
          5. Add a textbox object "txtHowMany" and label it
          6. Add a command button object and code to play:
            1. Create an array variable "strWord(10)" as string
            2. Confirm that the textbox is numeric
            3. If not, display an error message
            4. If so, in a loop, load the array variable with words from the user using an input box
            5. When all words have been added, display a complete sentance to the picture box
          7. Save & Test
        2. Create a Visual Basic Program "vbVolumeConverter":
          1. Create a new Visual Basic executable
          2. Design the form with sufficient controls and objects
          3. Process some volume conversions:
            1. Gallons
            2. Quarts
            3. Pints
            4. Cups
            5. Ounces
            6. Liters
          4. Save & Test

      45 11/15/05 Tuesday - Vocabulary, VB Practice: "vbRandom", "vbNumberGuess" "vbWeightConverter"
      1. Classroom Discussion -
        1. End of Marking Period 1 - 3 days left
        2. Check your grades - if you haven't completed an assignment, you may complete it this week
        3. MATES mid-term exams - please be respectful and quiet
        4. Visual Basic online text from samsPublishing.com
      2. Lab Assignment -
        1. Visual Basic program "vbRandom" to display random numbers on a picture box:
          1. Create a new Visual Basic executable
          2. Add a command button object "cmdExit" to exit
          3. Add a list box object "lstOutput"
          4. Add a command button object "cmdClear" to clear the list box
          5. Add a command button object "cmdRandom" to additem random numbers to the list box:
            1. Display random numbers: "lstOutput.Additem rnd()"
            2. Save & Test - random numbers are decimal numbers between 0.0 and 0.999
          6. Modify your code to display numbers between 1 and 6:
            1. Create variables "intHigh" and "intLow" to hold the highest and lowest random numbers possible
            2. Initialize the variables in the form_load() to 0 and 6
            3. Change the display line to read: "lstOutput.Additem Int((intHigh - intLow + 1) * Rnd()) + intLow"
            4. Save & Test
            5. Exit the program, run and test it again - you should get the same numbers
          7. Modify your code to create more randomness:
            1. Add "Randomize" to the form_load()
            2. Save & Test - numbers should be much more random
          8. Modify your form to allow the user to choose highest and lowest:
            1. Add two textbox objects "txtHighest" and "txtLowest"
            2. Modify the "cmdRandom" event subroutine to confirm both textboxes are numerical
            3. If not, display an error message
            4. If so, convert to integer numbers and assign to the correct variable
            5. Save & Test - random numbers should be between the user chosen lowest and highest numbers
        2. Visual Basic program "vbNumberGuess" to play a game asking the user to guess a random number between 1 and 100:
          1. Create a new Visual Basic executable
          2. Add a label object with instructions to the user
          3. Add a command button object and code to exit
          4. Add a label object to provide feedback to the user after the user guesses:
            1. User guess is too high (computer number is lower)
            2. User guess is too low (computer number is higher)
            3. User guessed the number correctly and is a winner
          5. Add a textbox object to receive the user guess
          6. Add two variables: intNumber to hold the random number and intGuess to hold the user guess
          7. Add a command button StartGame:
            1. Generate a random number between 1 and 100
          8. Add a command button object to play the game
            1. Confirm the user input is a number
            2. If not, display an error message
            3. If so, convert to an integer number and assign the value to intGuess
            4. Compare intGuess to intNumber and provide the user with the proper feedback
          9. Save & Test
          10. Modify to make more gamelike:
            1. Keep track of the number of incorrect user guesses
            2. Limit number of user guesses to 7
            3. In StartGame, reset number of guesses to 0
          11. Save & Test
        3. Visual Basic program "vbWeightConverter":
          1. Create a new Visual Basic executable
          2. Design the form with sufficient controls and objects
          3. Process some weight conversions:
            1. Ounces
            2. Pounds
            3. Tons
            4. British Tonnes
            5. British Stones
            6. Grams
          4. Save & Test

      46 11/16/05 Wednesday - Career, VB Practice: "vbSnake"
      1. Classroom Discussion -
        1. End of Marking Period 1 - 2 days left
        2. Check your grades - if you haven't completed an assignment, you may complete it this week
        3. MATES mid-term exams - please be respectful and quiet
        4. Effective Job Search Methods - on my careers page
        5. Visual Basic online text from samsPublishing.com
      2. Lab Assignment -
        1. Visual Basic program "vbSnake":
          1. Rules:
            1. The "snake" will start with a length of 5
            2. The "snake" will start moving at 10 spaces each second (timer interval = 100)
            3. The "food" will appear randomly and last for 5 seconds
            4. Each time the "snake" eats the "food" ("snake-head" top & left equal "food" top & left) the "snake" grows and adds 5 additional segments
            5. The length of the "snake" will never exceed 50 segments
            6. The speed will appear to increase when the "snake" feeds (decrease timer interval)
            7. The speed will never exceed light-speed
            8. The game ends when the "snake" encounters a wall ("snake-head" top & left pass outside the game field)
            9. The game ends when the "snake" encounters part of its own body ("snake-head" top & left equal part of the "snake" body)
            10. The number of "foods" the "snake" has eaten will appear on a label on the form
          2. Create a new Visual Basic executable
          3. Design the form with sufficient controls and objects
            1. Add a Shape object "shpBoard" for the game board
            2. Add a Shape object "shpHead" for the head of the snake
            3. Add a Shape object "shpFood" for the food
            4. Add a Timer object to control snake head movement
            5. Add a Label object "lblScore" to display the score
            6. Add a Label object "lblFoodTime" to display the food time
          4. Write the code
            1. In the Form_Load(), set the board, snake head, and food initial height/width sizes and top/left positions
            2. Keep track of direction with an integer number 1=up, 2=down, 3=left, 4=right
            3. On keyDown, use a Select Case to determine which key was pressed and change direction variable
            4. In the timer:
              1. Use a Select Case to control direction
              2. Rest for snake head position on board or over board
              3. Randomly place food on board
              4. Test for snake head overlap food and increment score and display score and move food
          5. Save & Test

      47 11/17/05 Thursday - Science, VB Quiz: "vbTipCalculator", "vbMagic8Ball" lab assignment
      1. Classroom Discussion -
        1. Mr. Clarke out - Career Day at Central Regional - be respectful of the substitute teacher
        2. End of Marking Period 1 - 1 day left
        3. Check your grades - if you haven't completed an assignment, you may complete it this week
        4. MATES mid-term exams - please be respectful and quiet
        5. Visual Basic online text from samsPublishing.com
      2. Lab Assignment -
        1. QUIZ - Take the Visual Basic Quiz 4. Click the link and follow the instructions. PRINT AND HAND IN. You only get one chance - this is not "try until you score 100". Open notes, open internet, open VB IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student
        2. QUIZ - Visual Basic Quiz program "vbTipCalculator":
          1. Design, write, create, test, run, and save a Visual Basic program to help the user calculate a tip for service in a restaurant
          2. Requirements:
            1. Ask the user the amount of the bill - textbox object
            2. Ask the user how good the service was - Excellent, Good, Fair, Poor - option button objects on a frame
            3. Suggest (display in a textbox object) a tip percentage based on service and allow the user to change it:
              1. Excellent = 20%
              2. Good = 15%
              3. Fair = 10%
              4. Poor = 5%
            4. Calculate and display (textbox object) the tip as a percentage of the original bill
            5. Calculate and display (textbox object) a total as the original bill plus calculated tip amount
            6. Ask the user (checkbox object) if the bill should be rounded up to the next whole dollar amount
            7. Code the round up checkbox
            8. Save & Test
          3. Copy the project and form and any images to your "H:/vb/vbTipCalculator" folder for me to assess
          4. Grading Criteria:
            1. Must give correct answer and all output specified in requirements above (60 pts)
            2. Must use correct object and variable naming conventions (txtSomething and intSomething) (5 pts)
            3. Must use Option Button object on a frame to allow the user to select service (5 pts)
            4. Must have author name, program name, and date written as comments (5 pts)
            5. Must have at least one programmer-written function or sub-routine (5 pts)
            6. Must use Option Explicit (5 pts)
            7. Must look good (5 pts)
        3. LAB - Visual Basic program "vbMagic8Ball" to simulate the fortune-telling device:
          1. Create a new Visual Basic executable "frmMagic8Ball" and "vbMagic8Ball"
          2. Add a label object with instructions to the user
          3. Add a textbox object to accept the user question
          4. Add a label object to display the magic 8 ball answer
          5. Add label objects to identify the question textbox and answer label
          6. Add and code a command button object to [eXit]
          7. Add variables to the Global section at the top:
            Option Explicit
            Dim intRand, intLow, intHigh As Integer
            
          8. Write code for the Form_Load() event:
            Randomize
            intRand = 0
            intLow = 1
            intHigh = 8
            
          9. Add and code a command button object to [Roll] the Magic 8 Ball
            intRand = Int(Rnd() * (intHigh - intLow + 1)) + 1
            Select Case intRand
                Case 1: lblAnswer.Caption = "Your Answer Goes Here"
                ...
                Case Else: lblAnswer.Caption = "Oops"
            End Select
            
          10. Add more Case and answers for a total of 8
          11. Save & Test
          12. Copy the project and form and any images to your "H:/vb/vbMagic8Ball" folder for me to assess

      48 11/18/05 Friday - Skills USA, PDP, VB Practice: "vbSnake" cont'd
      1. Classroom Discussion -
        1. End of Marking Period 1
        2. Check your grades - if you haven't completed an assignment, you may complete it TODAY
        3. MATES mid-term exams - please be respectful and quiet
        4. Visual Basic online text from samsPublishing.com
      2. Lab Assignment -
        1. Visual Basic program "vbSnake", cont'd
          1. Use "My Documents" or "My Computer" to navigate to and open your existing Visual Basic "vbSnake" program
          2. Add a Shape object "shpTail", set top/left = 0, width/height = 200, shape=1-Square, visible=False
          3. Copy and paste creating a Control Array of "shpTail()" a total of 50
          4. In the Form_Load(), in a loop, reset all "shpTail(i)" top/left/width/height/shape/visible properties
          5. Add a variable "intTailLength" to control the length of the tail and initialize it to 5 in the Form_Load()
          6. In a loop at the end of the timer, set top/left of each active (visible) tail segment to the top/left of the previous tail segment. When the snake head is moving, the tail will follow it like a centipede tail follows the centipede head -- snaking forward
          7. If the snake head hits one of the tail segments, game over
          8. When the snake head eats food, increment the tail length by 5 and decrement the timer interval by 20
          9. Save & Test

      webopedia
      webster
      whatis
      vocabulary