COIS 1520H Midterm Flashcards
What does “IDE” stand for?
Integrated Development Environment
Why use IDE?
Machine Learning - hard for humans to understand
Program Complex tasks - broken into instructions for the computer
Interface between humans/computers - translates commands into machine language (when code compiled)
What are the three main components of any program?
Input, Processing, Output
What are some examples of sources of input and output for a program?
Input: keyboard, mouse, code
Output: screen, printer, speaker, etc.
What is an algorithm?
Set of instructions to perform a task
What are the six steps in the Program Development Cycle, and explain each one.
Analyze: Define the problem
Design: Plan the solution
Choose the interface: Select the objects (text boxes, buttons, etc)
Code: Translate algorithm into programming language
Test and Debug: Locate and remove any errors
Documentation: organize all materials that describe the program
Name three programming tools that help convert algorithms into code, and explain each one.
Flowcharts: graphically depicts the logical steps to carry out a task and shows
how the steps relate to each other
Pseudocode: use English-like phrases with some non-language dependent
programming constructs to outline the program
Hierarchy chart: shows how the different parts of a program relate to each
other
What is the “Divide-and-conquer” method?
Take a large problem and break it down into smaller problems solving the small ones first
Name and explain the three statement structures that are available in programming .
Sequence: follow instructions from one line to the next without skipping over
any lines.
Decision: if the answer to a question is “yes” then one group of instructions is
executed. If “no”, then another is executed.
Looping: a series of instructions are executed over and over. (Need a
“terminating condition”, otherwise you have an infinite loop.)
Explain what a GUI is.
Graphical User Interface
- Provides an easy-to-understand environment
- Can concentrate on coding, less on learning
environment.
Define an “event-driven” language.
Sequence of instructions executed is controlled by
events; “No events = no action”
Name four different controls that are available to us when designing a form
Text Box control
Button control
Label control
List Box control
Name a control that can be used for both input and output.
Form control; when used for output - ReadOnly property should be set to True
Describe how the AutoSize property works for a label: what does it do?
When True, label will resize automatically to
display caption on one line
When False, label can be resized manually.
Allows for multi-rowed label.
- Name the two primary purposes for a list box control.
- Used to display several pieces of output.
2. Allows user to select items from a list.
What is the difference between a proportional-width font and a fixed-width font?
Proportional-width fonts take up less
space for “I” than for “W”
Fixed-width fonts take up the same
amount of space for each character
Describe the tab order on a form, and why it is important.
Determines order of focus when tabbing; starts at 0.
What is an event?
An event is an action, such as the user clicking on a button
Name and describe the steps in creating a Visual Basic program:
Create interface: generate position and size the objects
Set properties: configure the appearance of the objects
Write the code: this executes when events occur
Name two ways to get access to the event procedures for an object:
Double-click on a control
Use the Class Name and Method Name boxes
Describe how a txt file can be used for both input and output.
Can be created, viewed, and managed by the Visual Basic IDE
Define a numeric variable.
A numeric variable is a container to which a number can be assigned.
What value are numeric variables automatically initialized to?
0
Show two different ways that var can be incremented by 1
var = var + 1, var += 1