Visual Basic

 

Syllabus   Sample Programs

1/19

Chapter 1-Introduction to Visual Basic & Other Information

  • Take Role & 1st day attendance
  • What is Programming?
  • What is a compiler?
    • Visual Studio Express Edition
    • Installing it
  • File management / Windows Explorer
  • Applied Technology minor
  • Getting started with our 1st VB Program
  • Importance of truly understanding the first few chapters
    • Terms
    • Don't underestimate the importance of knowing where you saved your program
    • Using the compiler
    • AWA - Alternate work assignments
    • When to meet in the Lab (Dundee in Ross Hall)
    • Designing a Program (Software Engineering)
    • What is an algorithm?
    • Flowcharts & Pseudocode
    • More notes

 

 

 Link to download Visual Basic and some other tools.

Page 14. Writing your first Visual Basic Project

1.     Set up workspace

2.    Start new project

3.    Set up Environment

4.    Plan

5.    Place Controls on Form p. 19

6.    Set Properties p. 23

7.    Write Code p. 29

8.    Run p. 35

9.    Save & re-open p. 36

10.  Modify p. 38

Start our first walk-through VB program.

1/26

Chapter 2 - User Interface Design

  • Controls and Events
  • Make sure you read this chapter carefully it covers fundamentals that are the building blocks of everything else.

I'll go over an example of a small program.

Do the Walkthroughs in chapter 2:

         Text Box

         Button

         Label

         List Box

 

I'll go over the Flag Viewer program & answer any questions

Read Chapter 3 for next time

 

2/2

Chapter 3 - Variables, Constants, and Calculations

Flag viewer assignment due.  I'll come around and check these.

What is Critical Thinking?
Blooms Taxonomy

Start the Hands-On Programming Example page 145

- Very important chapter
- Talk about strings
- Bring in Questions!!

Continue with the Hands-On example

Assignment #2 - Very Very Boards Page 158

In-class example :Compound Interest

A = P\left(1 + \frac{r}{n}\right)^{nt}
  • A = final amount
  • P = principal amount (initial investment)
  • r = annual nominal interest rate (as a decimal)
  • n = number of times the interest is compounded per year
  • t = number of years

2/9

Chapter 4 - Decisions and Conditions

  • If Statements
  • Case Statement (p. 185)
  • Boolean Math
  • Calling other event functions
  • Making one function handle more than one event

Let's try a problem requiring a decision in class:

In-Class Example

 

? 4.4

2/16

Demonstrate a Case study Example

 

Image Consulting Example

Piece Work Calculator - 4.6, page 207

Review for Exam

2/23

Exam 1
Will be on:

  • Chapters 1 thru 5
  • If Statement
  • Functions
  • Procedures
  • Boolean
  • Case Statement

Exam 1 Solution

Chapter 5

  • Menus
  • Common Dialog Boxes
  • Sub Procedures
  • Function Procedures

Possible internship, Paid

Menu and Function Example - The extension of the piecework Calculator from last class.

3/2

Go over the Exam

Chapter 6 - Multiform Projects

Sample Project implementing a multiform program

Let's edit the compound interest problem we did the other day.

Practice Problem.

Spring Break  March 7th thru 11th

3/16

Chapter 7 - Lists, Loops, and Printing
 - Loops
 - Do While
 - Do Until
 - For - Next Loops

 

Sample problem with all kinds of stuff -> Chapter 7 Exercise 7.3

Start Chapter 7 Exercise 7.3

Go to the sample page and copy the Exercise 7.3 Skelton and start there, will save you some time.

Extra ->Class example of the American to British Translations

3/23

Chapter 8 -  Arrays
- More organized way to store a lot of related data
- Some consider this the most complex topic of the course.
-  Not that hard, just another way to store a lot of related data.

Array example in class. ->

 

- Load states and their abbreviations into an array of records

- display

- find something

-Save the states.txt file to the bin folder in the debug folder in the project folder.

Project->bin->debug->put text file here.

Let's compute the average of a list of numbers.  Make sure you load the numbers into an array first.  Then loop again and determine the average.  We are using an array as practice.
List of Numbers

 

Maybe:

We can work on sorting
Write a simple program that sorts a file, we can use the egg file from way back, Use either bubble or selection sort.
Eggs.txt

3/30

Example implementation of an array of Records.  We'll look at 8-1, but we're also going to read the data in from a file.  So it's a little of chapter 11 also. -> we did something similar last week, we should sort or move on to 2-D array. 

 

Let's start the day with an exercise on opening a file, loading the data to an array then sorting the data.

 

 

Let's do an old exam I dug up, I want you to give it an honest try first.

Sample Exam 2

If there's time let's assume they are not sorted, and we need to sort them first.

 

4/6

Chapter 10 - Database

 

Do an example in class of a project with a database connection

Work on an example
4/6 Chapter 10 Database Applications

Books doesn't seem to go over more than what we already did.

Making a web page with Visual Basic

 

 
Let's look at 8-1 using a 2-d array instead of an array of records??

4/13

Review for the Exam

Continue with Database - Maybe?

Let's Look at the web page notes - Chapter 9 - Web Applications

For the 2nd hour, finish the notes & start a sample

Last hour let's make a simple web page

Don't forget about the Exam!!!

4/20

Exam 2

 

4/27

 

Let's start the review.  I'd like to go over more functions and procedures.

Show example that uses a function.  5.3 page 249.

 

 

Final Exam will be on May 4th, same time as class

 

Assignments:

 

Assignment #

Due Date

Description

1

1/26

2.2 Page 104 - Flag Viewer Problem due

2

2/9

Very Very Boards Page 158

3

2/23

Very Very Boards Page 252 - Adding on to the one you did in Chapter 4

4

3/9

Very Very Boards Page 286 - Adding multiple forms

5

4/6

Very Very Boards Page 360 - Load up data to an array, print out.

6

4/20

11.5 Page 467