CS 207
Introduction to Problem Solving and
Programming Using Visual Basic®
Module 3
Introduction to Computer Operations and
Basic Terminology
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
1
Module 3 Outline
• Approaching the Problem Solving Process
• Modeling Computer Operations
• Being a “Computer Model”?!
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
2
Your Problem Solving Behavior?
• You will constantly be presented with some
situation (“it”) partially describing a “problem” or
“opportunity” that requires you to:
– Observe “it” and read documentation about “it”
the inputs to you about “it” (the givens)
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
3
Your Problem Solving Behavior?
• You will constantly be presented with some
situation (“it”) partially describing a “problem” or
“opportunity” that requires you to:
– Observe “it” and read documentation about “it”
the inputs to you about “it” (the givens)
– Formulate questions to clarify missing or unclear
information about “it.”
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
4
Your Problem Solving Behavior?
• You will constantly be presented with some
situation (“it”) partially describing a “problem” or
“opportunity” that requires you to:
– Observe “it” and read documentation about “it”
the inputs to you about “it” (the givens)
– Formulate questions to clarify missing or unclear
information about “it.”
– Formulate a Solution producing an intended result
(output from you) that demonstrates “it” has been
converted from a problematic or opportunistic
situation to an operational situation.
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
5
Questioning is Key in programming
• Think of the answers (solutions to programming
problems) as being:
– Objects (VB graphical controls or tools you select)
– Statements (VB code you write that performs actions)
– User Actions that a user performs using these objects
and statements.
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
6
Questioning is Key in programming
• Think of the answers (solutions to programming
problems) as being:
– Objects (VB graphical controls or tools you select)
– Statements (VB code you write that performs actions)
– User Actions that a user performs
• You cannot produce answers if you cannot:
– Decompose (break down) problems into small units;
– Formulate the necessary and correct questions; and
– Take action to ask or research some resource to
locate information resolving the questions!
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
7
Questioning is Key in programming
• In this course: Questions formed and asked are
more important the answers you already know.
– Why?
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
8
Questioning is Key in programming
• In this course: Questions formed and asked are
more important the answers you already know.
– Why?
• BECAUSE the ability to form insightful questions
will lead you to the answers you need.
– If you do not know something, and
– can not form the needed question then
– you can’t find a path to the needed answer.
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
9
What basic concepts do you need to start?
• How does a processor actually operate?
• How do VB objects and statements control
computer operations?
• What are VB graphical objects anyway?
– What are they called? What can they do?
– Where are they located? How do I use them?
• What are VB statements (code) anyway?
–
–
–
–
What are they called?
What can they do?
How are they formed?
How do I use them?
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
10
How do I learn these basics?
• Learn certain basic fundamentals of how a
computer processor actually operates:
– Sub text: How dumb computers really are!
– Repeat the following until an instruction to stop is
executed:
• Step to the next instruction and retrieve it
• Decode the instruction (determine its meaning)
• Execute the instruction
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
11
How do I learn these basics?
• Learn certain basic fundamentals of how a
computer processor actually operates:
• Learning Tactic: You will role play being a
computer processor!
– Repeat the following as if you are the computer
processor until an instruction to stop is performed.
• Read each step in an example algorithm
• Interpret the meaning, and
• Execute (perform) the instruction
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
12
How do I learn these basics?
• Learn certain basic fundamentals of how a
computer processor actually operates:
• Learning Tactic: You will role play being a
computer processor!
• We begin with a Human-to-Human
communication process:
– Internal vs. External “Data”
• Self-to-self
• Instructor-Student
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
13
Essential Communication Concepts
• Data in the mind versus data on paper!
• Memory (input) Data in the Mind
– Think of any ten people you know and their first
names
– This “data” represents input to the next action.
• Produce (output) Data on paper
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
14
Essential Communication Concepts
•
•
•
•
Data in the mind versus data on paper!
Memory (input) Data in the Mind
Produce (output) Data on paper
To do this you need to know the algorithm (step
by step instructions) that specify:
–
–
–
–
–
–
Acquiring needed materials (paper, pen, etc.)
Paper size, pen type (ink, width), draw surface, etc.
What language (script) and symbols to use
How to draw the symbols (form)
Where symbols are to be placed, etc.
NOTE: what is not specified you tend to “make up!”
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
15
Perform the algorithm below?
Algorithm: Produce Data on paper (output)
1.
2.
3.
4.
5.
6.
7.
Get a piece of 8.5” x 11” paper, orient to landscape position, place on
a solid drawing surface, and acquire a writing implement.
In the upper left corner of the paper, draw a .25” x 1” clear title box,
below it attach a clear .25” x 1” value box; the pair of boxes together
will be called a data box (e.g. an object).
In the data box’s title box write: “PeopleCount”
In the center of the data box’s value box write the numeric value for
the number of people (the digit five).
To the right of the PeopleCount data box, make a new data box.
Enter “Person5” in it’s title box; put a person’s name in the value
box (e.g. “Jim”). Call this data box instance a “Person#” data box.
For each of the other 4 people, starting with the #=4 and going in
descending order, make a Person# data box, place it to the right and
down from the last Person# data box, set the title to the Person# and
the value to a name; place (space) the boxes so as to place the last
data box for “Person1” in the lower right corner of the paper.
Stop.
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
16
“Data on Paper” – Did you draw this?
PeopleCount
5
Person5
Cara
Person4
Sam
Person3
Jon
Person2
Joe
Person1
Sue
17
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
It is doubtful yours looks exactly like mine!
• Realizing that I wrote the algorithm [step by step
procedure]:
– I knew what I meant by each step!
– I didn’t know (I was not aware of)
• “what I was assuming” others would know.
– I can not recognize that my “step descriptions” are
incomplete when they are incomplete for another
person.
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
18
Getting it out of the Mind!
• At issue is “What did you think I meant?”
–
–
–
–
We surely have different names
The symbols are not exactly the same size or shape
Symbol placement is likely different
Perhaps you couldn’t even draw it because the steps
were confusing!
– Perhaps you left out details because you didn’t think
this was important (students always know best! ).
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
19
Data in the Mind Data on Paper
PeopleCount
5
Person5
Cara
Person4
Sam
Symbols (data) in use on paper:
1. Digits {0,1,2,3,4,5,6,7,8,9}
2. Letters {<alphabet>}
3. Lines for making square boundaries
4. Address: location (place on paper)
5. A data box has two properties:
1. A title box with an <identifier>
2. A value box with a value
A value could be numeric
A value could be text
Person3
Jon
Person2
Joe
Person1
20
Sue
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
Data on Paper Data in the Mind
PeopleCount
Person10
10
Jim
Person9
Dave
Person8
Deb
Person7
Jan
If this revised paper were an input to you
(never seen before, or not seen for
a long time) and you read English,
the output would be a mental model
in your mind that represents the data
about the ten people and their names.
Person6
Gil
Person5
Cara
Person4
Person3
Jon
The “picture” communicates more than
the algorithm!
Sam
Person2
Joe
Person1
21
Sue
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
Data I/O Human-to-Human?
Data in the Mind
• Mental Models
• Interpretation
• Meaning
CSCI 207 - Module 3
Data on paper (English in the USA)
• Symbols people can read (input)
• Symbols people can write (output)
S. T. Schuyler, D.Sc.
22
Problem: Put the Data in the Computer!
• Questions that must be asked/answered:
1. How are objects (like boxes with names and values)
stored in a computer?
2. What method of expression is used to describe
objects and operations so that both a person and a
computer can:
CSCI 207 - Module 3
compose or write (output) descriptions of the objects and
operations,
read (input), and interpret the descriptions in precisely the
same way?
S. T. Schuyler, D.Sc.
23
Problem: Put the Data in the Computer!
• Questions that must be asked/answered:
3. How does one communicate with a computer?
CSCI 207 - Module 3
Enter descriptions of objects and operations (algorithms)?
Save and restore these descriptions?
Edit (change, delete) these descriptions?
Execute (test) these descriptions?
S. T. Schuyler, D.Sc.
24
Data in the Computer?
Data in the Mind
• Mental Models
• Interpretants
• Sememes
Data on paper (English in the USA)
• Symbols people can read (input)
• Symbols people can write (output)
Data on paper (or screens)
• Symbols (VB in this course)
people and computers both can:
• read / write; input / output
? • interpret the same way
?
Data in the Computer
• Symbols computers can:
input
process
output
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
25
Example A: the Data Half
(represents the computer’s memory)
Example A: Demonstrate Computing Model A - You play the part of the computer processor
Variable Names: (see list row 5) Variable Type:
Simple
Data Type:
Integer
1
2
Variable
Name:
Initial
values
Step
3
Box0
Box1
Box2
Box3
Box4
Box5
Box6
Box7
Box8
Box9
Box10
0
6
3
9
2
11
2
91
48
66
1
When you want to change a Box value, enter the new value in the corresponding cell
below (same column, row of the step involved).
1
2
3
4
End
"Computer" (that means you): for each step below, perform the instruction given. Place
any result for a step on the row above labeled for that step, and in a cell under the
column for the specified BoxID (for example, the result for step 1 has a solid border).
1. Names of the “data boxes” (e.g. the “title boxes”)
2. Values in the “data boxes” (e.g. the “value boxes”) before the algorithm is performed.
3. Changes to “value boxes” as each step is performed (the current value if changed)
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
26
Variables
• What is a variable?
– Identifier
– <data type>
– <value>
Its name (location)
What kind of value? How Big?
the data
• Some <data types>
– Character
– Integer
– String
CSCI 207 - Module 3
1 byte
4 bytes
>4 bytes
S. T. Schuyler, D.Sc.
1 ASCII Character
+|- 231 -1
? bytes
27
Example A: the Algorithm Half
Start
Add: (Number in Box4) + (Number in Box2); put result into Box7
Add: (Number in Box7) + (Number in Box whose Number is in Box6);
put result into Box6
Multiply: (Number in Box6) * (Number in Box1); put result into Box5
What number is now in Box5? Write the value in the box on
the right.
Stop
Answer the following questions:
• Algorithm
– A finite number of unambiguous steps which are known to convert inputs to
outputs effectively and terminate (complete or stop) in an acceptable period of
time.
• You read each step, interpret it and perform the action indicated on
the data area at the top of the worksheet (previous slide).
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
28
Some Notes
• References like “(Number in Box4)” shown in
step 1 are called direct references.
• Some of you might have trouble in step 2 with
“(Number in Box whose number is in Box6)”
–
–
–
–
This is an example of an indirect reference
First you get the number in Box6 (2 in this case)
Concatenate (join) the string “Box” and the number 2
Then get the value in Box2
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
29
More Modules
• Models A3-1 and A3-2 (handout)
CSCI 207 - Module 3
S. T. Schuyler, D.Sc.
30
© Copyright 2026 Paperzz