Visual Basic:
Day 1 – Introduction
The goal is to provide a general knowledge of the development environment for windows programming. It should provide an idea of what is meant by a graphical user interface and suggest design techniques. Students should be introduced to basic coding by using event driven objects in Visual Basic.
Topics Covered:
Demonstrations:
Hello World Program
Use a command button to display the contents of a textbox inside of a label. Introduces basic widget components and some graphical screen design. Add a button to exit the program.
Simple Calculator
Use two textboxes to input values. Display the results using a label that is filled with the click of a command button. Demonstrate the use of variables to store value of each item in the text boxes.
Mouse Move Over Buttons
Simple program that toggles the visibility property of a button when you move the mouse over it. Will appear as though the button moves away from the mouse. Should demonstrate different events for objects and introduce visibility properties.
Assignments:
Test Average Problem
Write a program to display the average of 3 test scores.
Use textboxes to enter values for the 3 test scores.
Display the average in a label.
Semester Average Problem
The semester average is a combination of the two quarter averages and the final exam score. One way to calculate this average is to multiply each quarter average by 2 and find the sum of the three values:
use 3 text boxes to enter the two quarter averages and the final exam score expressed as a percentage mark like 67 or 86.
Divide this result by 5
Display as the semester average in a label.
Day 2 – Basic Programming Techniques
The goal is to develop and introduce basic programming techniques such as conditionals and looping constructs.
Topics Covered:
Demonstrations:
Name Program
Produces different results depending on the name of the person entered in a text box. A message box will appear with the name specified in the textbox. Use a slider bar to specify the age of the person. The event is driven by a timer control and the message box will pop up at the timer’s interval. Demonstrates use of if statements and conditionals and new widgets.
Course Selection
Program that lists a number of courses to take and computes the total number of courses taken while the user is checking or un-checking courses. Demonstrates use of check boxes and option buttons and emphasizes conditional statements.
Show previous Pizza Program samples.
Assignments:
The Pizza Problem
Design a program for a pizza place to calculate the cost of a pizza.
Your program must use:
A label for the name of your pizza place
A label for the total cost of the pizza.
A checkbox with at least 8 different toppings
An option box for small, medium, and large pizzas.
An option box for delivery or pick-up
A graphic using picture box or image.
Pricing:
Small pizza $5
Medium pizza $7
Large pizza $9
Each topping added is an extra $1
Pick up orders get $1 off and deliveries are no extra charge.
Day 3 – Advanced Programming Techniques
The goal is to develop and introduce more advanced techniques used for computer programming such as arrays and looping constructs.
Topics Covered:
Demonstrations:
Pizza Program With Arrays
Create a small program to facilitate ordering of pizzas. Use only 5 toppings, but each is a check box element in an array. Loop through the array to compute the price of the pizza. Add menu bar for File Exit and About.
Slider Adder
Find the sum from a minimum to a maximum value. Each value should be retrieved from a slider bar.
Assignments:
The Pizza Problem II
Modify your pizza program to include menus.
Add 4 menu headings, FILE, ADDITIONS, PAYMENT, HELP
Under File, add EXIT to exit the program.
Under Additions add the following extra order items:
Cheese Toast $4
Garlic Toast $3
Bread Sticks $2
If someone selects one of these, The total cost must change for each item added.
Under Payment, add:
Cash
Cheque
Credit Card
Debit
You can only pay with one payment method.
Under HELP, add a message box that tells the user a short message. Also under HELP, add an ABOUT message box that tells the user who made the program and on what date.
Number Adder
Have the user select a minimum value and a maximum value from two scroll bars. Use a loop to add up all the even numbers from the minimum value to the maximum value. Display the minimum, maximum and total values in labels. eg. if the minimum number is 2 and the maximum number is 7, then the total will be: 2+4+6=12
Day 4 – Good Design Techniques
The goal is to understand good design techniques for window applications. Students should gain the understanding of basic principles that can be applied to designs to enhance ease-of-use for users.
Topics Covered:
Demonstrations:
Pizza Software
Show an example containing good and bad design components.
Simple Game Demonstrations
Previous Class Assignments
Assignments:
Program of Your Choice
Design a program of your choice that uses the programming techniques you have learned.
Some examples:
Simple games (tic tac toe, hang man)
Calculator
Text Editor
Day 5 – Deploying Your Programs
The goal is to understand how to deploy software as executable files and to incorporate setup packages into distribution.
Topics Covered:
Demonstrations:
EXE & Deployment
Create a simple program and create an executable file for the project. Use the setup package wizard to include required files for deployment
Assignments:
Program of Your Choice
Finish the program of your choice and create a setup package for it.