8/6/2019 Lect Vbint
1/23
Visual Basic Introduction
IDS 306
from Shelly, Cashman & RepedeMicrosoft Visual Basic 5: Complete
Concepts and Techniques
8/6/2019 Lect Vbint
2/23
Processing
Parallel Processing -- more than one CPU
(each with its own memory); able to carry
out more than one instruction at a time
Multitasking -- one processor, moves back
and forth between programs
8/6/2019 Lect Vbint
3/23
Graphical User Interface (GUI)
Design Should be under users control
user should be able to customize
Form should follow function Use concepts and metaphors familiar to
user; parallel real-world experience
Visually and functionally consistent Immediate feedback
Attempt to prevent user mistakes
8/6/2019 Lect Vbint
4/23
Program Development Life Cycle
(PDLC)Methodology -- organized plan that breaks
process into steps
Analyze the problem
Design the problem
Code the program
Test and debug program
Formalize solution
Maintain the program
8/6/2019 Lect Vbint
5/23
Hierarchical Input Process
Output (HIPO) Chart A.k.a. hierarchy chart ortop-down chart
Represents subdivision of activities visually
Lowest level instruction -- procedure
p. I.7p. I.7
8/6/2019 Lect Vbint
6/23
Flow Chart Process Symbol
Input/Output (I/O)
Flowline Annotation
Decision
Terminal
Connector
Predefined Process
p. I.7p. I.7
8/6/2019 Lect Vbint
7/23
Major Constructs of Structured
Programming Control Structures
Sequence
Selection
Case
Repetition
DoWhile DoUntil
8/6/2019 Lect Vbint
8/23
Control Structures Sequence Control Structure -- used to show a
single action or one action followed in order
(sequentially by another) Selection Control Structure -- used to tell the
program which action to take based on a certain
condition Case Control Structure -- form of selection
that allows for more than two alternatives
8/6/2019 Lect Vbint
9/23
Control Structures (cont.) Repetition Control Structure -- a.k.a. looping
oriteration; used when a set of actions is
performed repeatedlyDo...While loop repeats as long as condition is true
(may never execute)
Do...Until loop evaluates condition at end of theloop (will always execute at least once)
Nested Control Structure -- contained within
other control structures
8/6/2019 Lect Vbint
10/23
Object-Oriented Programming
(OOP) Object -- anything real or abstract, about
which you store both data and operations
that manipulate the data
Class -- an implementation that can be used
to create multiple objects with the same
attributes and behavior
Object is and Instance of a Class
8/6/2019 Lect Vbint
11/23
Generalization Hierarchy
Object-oriented design tool used to show the
relationships among classes of objects
p. I.11p. I.11
8/6/2019 Lect Vbint
12/23
Object-Oriented Terms Attribute -- identifying characteristics of
individual objects, such as name or color
Operation -- an activity that reads ormanipulates the data of an object; called
service in OOD, in OOP called a method
Message -- has two parts: name of object towhich message is sent, name of operation that
will be performed. In OOP called event
8/6/2019 Lect Vbint
13/23
Object Structure Diagram
p. I.12p. I.12
8/6/2019 Lect Vbint
14/23
Event Diagram
Used to represent relationships among events andoperations
Operations shown in rounded rectangles
Events shown on lines with arrows
p. I.13p. I.13
8/6/2019 Lect Vbint
15/23
Major Constructs of OOP
Encapsulation
Inheritance
Polymorphism
8/6/2019 Lect Vbint
16/23
Encapsulation
Capability of an object to have data
(properties) and functionality (methods)
available to the user without the user having
to understand the implementation within the
object
Also called information hiding
Process of hiding the implementation details
of an object from its user
8/6/2019 Lect Vbint
17/23
Inheritance A descendent class (subclass) that differs
from its superclass in only one way contains
just the code or data necessary to explain
the difference
Also known as subclassing
8/6/2019 Lect Vbint
18/23
Polymorphism
Allows an instruction to be given to an
object in a generalized rather than specific
detailed command
Same command will get different but
predictable results depending on object
receiving command Specific actions, internal to object differ,
results are the same
8/6/2019 Lect Vbint
19/23
Rapid Application Development
(RAD) Use of prebuilt objects to make program
development much faster
Shorter development life cycles
Easier maintenance
Capability to reuse components
8/6/2019 Lect Vbint
20/23
Benefits of OOP
Reusability -- classes designed to be reused in
many systems or create modified classes using
inheritance Stability -- classes designed for repeated reuse,
become stable over time
Easier Design -- object is a black box Faster Design -- can be created from existing
components
8/6/2019 Lect Vbint
21/23
Prototyping
Process where developers iterate between
refining the specifications and building
working models of the system
8/6/2019 Lect Vbint
22/23
Visual Basic Properties -- attributes of objects
Controls -- check boxes, list boxes, etc.
Forms -- windows that contain applications
controls
Events -- messages or requests for service
Procedures -- operations or services
include methods, functions, subroutines
8/6/2019 Lect Vbint
23/23
Creating VB Applications Create the interface
Set the properties
Write the code