CSCI 111

Introduction to Problem Solving with Visual Basic

Coordinator: Muhammad Chaudhary

Credits: 4.0

Description

Designed to introduce problem solving and computer programming to students who are not computer science majors. Topics include Windows® operating system, Visual Basic development environment, data types, objects and methods, graphical user interfaces, programming structures such as decisions, repetition, arrays, sequential files, and graphical display of data. No credit toward computer science major. Offered periodically.

Prerequisites

None.

Sample Textbooks

Course Outcomes

  1. Create programs that make use of graphical objects such as buttons, lists, combo boxes, dialog boxes, etc.
  2. Write programs using control structures such as selection, loops, and functions.
  3. Write programs using sequential access files.
  4. Develop multimedia applications using graphics, sound, and color objects.

Major Topics Covered

A. Introducing Visual Basic

1. The Visual Basic Programming Language
2. A Visual Basic Application
3. The Visual Basic IDE
4. Adding Objects to a Form
5. Object Property Values
6. Resizing and Moving an Object
7. Saving a Project
8. Running a Visual Basic Application
9. Objects and their Event Procedures
10. Printing a Project
11. Removing a Project from the IDE
12. Using Assignment to Change Property Values
13. The Form_Load Event Procedure
14. Commenting Code, Opening a Project
15. Image Objects, Operators and Expressions
16. Creating an Executable File
17. Exiting Visual Basic
18. Visual Basic Programming Guidelines

B. Variables and Constants

1. Using Variables
2. Variable Assignment
3. Using Named Constants
4. Choosing Identifiers
5. built-in Data Types
6. Variable Declarations
7. Syntax Errors
8. Debugging Techniques-The Immediate Window
9. Obtaining a Value from the User
10. Automatic Type Conversion
11. Special Division Operators
12. Option Buttons

C. Controlling Program Flow

1. The If...Then Statement
2. Round off Error
3. The If...Then...Else Statement
4. Nested If...Then...Else Statements
5. The If...Then...ElseIf Statement
6. Generating Random Numbers
7. Scope, Logical Operators
8. The Do...Loop Statement
9. The For...Next Statement
10. Infinite Loops

D. Input, Strings, and Data

1. Input Boxes
2. Message Boxes
3. Check Boxes
4. Using Accumulators
5. String Conversion Functions
6. Manipulating Strings
7. The Len Function
8. The InStr Function
9. Generating Strings
10. Character Data Storage
11. ASCII Codes, Comparing Strings

E. Procedures

1. Procedures
2. Value Parameters
3. Documenting Procedures
4. Reference Parameters
5. Static Variables
6. Function Procedures
7. Using Object Parameters

F. Simple Mathematical and Business Functions

1. The IsNumeric Function
2. The Round Function
3. Formatting Numeric Output
4. Built-in Business Functions

G. Graphics, Color, and Sound

1. Using Color
2. Adding Lines to an Application
3. Adding Shapes to an Application
4. Picture Boxes, Moving Shapes and Picture Boxes
5. Using Graphic Methods
6. Container Properties that Affect Graphics
7. Using a Timer Object
8. Moving Line Objects
9. Animation
10. Adding Sound

H. Sequential Access Files

1. What is a File?
2. Opening a File
3. Reading Text from a File
4. Closing a File
5. Multiline Text Boxes
6. Writing Text to a File
7. Writing Records
8. Appending Data to a File
9. Reading Records
10. Updating and Deleting Records
11. Deleting and Renaming Files
12. Using the File System Controls

I. Optional Topics � (if time allows)

1. Arrays

2. Searching an Array

3. Bubble Sort

4. Timing Code

5. A More Efficient Bubble Sort

6. Selection Sort

Sample Laboratory Projects