Chapter 1 - 3 Flashcards
GUI
Graphical User Interface
windows, icons, and menus that can be manipulated by a mouse
Program
a collection of instructions that directs the hardware; software; project; application; solution
Input
the data necessary to obtain the output
Output
what the task produces
Processing
determine what formulas or ways of doing things should be used to obtain the output
Programmer
developer; person who solves problems by writing programs on a computer
User
any person who runs a program
Program Development Cycle
devising a carefully thought out step-by-step process that enables programmers to use their time efficiently and help them design error-free programs that produce the desired output
The Steps: Analyze, Design, Design the Interface, Code, Test and Correct, Complete the Documentation
Flowchart
consists of special geometric symbols connected by arrows; within each symbol is a phrase presenting the activity at that step; the shape of the symbol indicates the type of operation that is to occur
Flowline (arrow) - used to connect symbols and indicate the flow of logic
Terminal (rounded rectangle) - used to represent the beginning (Start) or the end (End) of a task
Input/Output (parallelogram) - used for input and output operations, such as reading and displaying
Processing (rectangle/square) - used for arithmetic and data-manipulation operations
Decision (diamond) - used for any logic or comparison operations; has two exit paths, one for “yes” and one for “no”
Connector (circle) - used to join different flowlines
Annotation (divining rod) - used to provide additional information about another symbol
Pseudocode
an abbreviated plain English version of actual computer code; English-like statements that outline the process
Form
a blank window
Control
objects added to a form
IDE
Integrated Development Environment (Visual Basic is an example)
Menu Bar
displays the menus of commands you use to work with Visual Basic
Tool Bar
holds a collection of buttons that carry out standard operations when clicked
Toolbox
holds icons representing objects that can be placed on the form
Solution Explorer
displays the files associated with the program and provides access to the commands that pertain to them
Textbox
a type of control used to get information from the user, referred to as input, or to display information produced by the program, referred to as output
Label
controls placed near text boxes to tell the user what type of information is displayed in the text boxes
Button
control that the user clicks on to initiate an action
List Box
control used to display output and/or make selections
Property: Text
determines the words displayed
Property: Name
indicates the name of an object
Property: Visible
indicates visibility of an object
Property: Enabled
returns or sets a Boolean value that indicates whether permissions are enabled on the active document
Property: Font
indicates the font of an object’s text
Property: ForeColor
indicates the foreground color used to display text and graphics in an object
Property: BackColor
indicates the background color of an object
Tab: Tab Stop
indicates whether or not tabs are allowed to be entered directly into a control
Tab: Focus
indicates which control is focused on using the tab key
Naming Controls
series of letters, digits, and underscores
must begin with a letter
cannot be a reserved key word (turns blue)
not case sensitive
for consecutive words, first word is low caps and successive words have first letters capitalized
Snap Lines
when activated, this feature causes a line to be drawn between an edge of the control you are currently moving and and the corresponding edge of the closest control on the form when the edges are in alignment
Events
a signal that informs an application that something important has occurred; events also allow separate tasks to communicate
Procedures
a block of Visual Basic statements enclosed by a declaration statement (Function, Sub, Operator, Get, Set) and a matching End declaration; all executable statements in Visual Basic must be within one of these
Code Editor
a window where you write most of your code; a highly specialized word processor with a number of features that make writing Visual Basic code a lot easier
Intellisense
general term for a number of features:
List Members, Parameter Info, Quick Info, and Complete Word
these features help you to learn more about the code you are using, keep the parameters you are typing, and add calls to properties and methods with only a few keystrokes; language-specific
Assignment Statements
carry out assignment operations, which consist of taking the value on the right side of the assignment operator (=) and storing it in the element on the left
Keywords
reserved; you cannot use them as names for programming elements such as variables or procedures; you can bypass this restriction by enclosing the name in brackets [ ]
Event: Click
occurs when the control is enabled and the user both presses and releases a mouse button while the mouse pointer is over the control
Event: Leave
occurs when the input focus leaves the control
Event: Enter
occurs when the control is entered
Method
a process that performs a task for a particular object
ends with a set of parentheses( )
Variables
store values; has a name and data type
Declarations
Statement - to name and define procedures, variables, properties, arrays, and constants; Dim statement
Variable - specify its name and characteristics
Double
positive and negative number that can have decimals
Integer
positive and negative whole number
String
text; sequence of zero or more items treated as a single item Examples: "Hello" "Bill Gates" "The rain in Spain . . . "
Initial Value
when making a Dim statement, this is what comes after As
Initialize
assign an initial value for a data object or variable
Incrementing a Variable
to add or subtract one to the numeric variable var var = var + 1 or var = var - 1
Math Functions
the methods of this system provide trigonometric, logarithmic, and other such common types of these
Math Operators
+, -, *, /
\ is integer division (gives whole number)
Mod(ulus) provides a remainder from integer division
Order of Precedence
never rely on the order of precedence; use parentheses to group statements, such as (2 * 3) + 4 instead of 2 * 3 + 4 and (2^3) + 4 instead of 2^3 + 4
Converting Strings to Doubles and Integers
CDbl(txtBox) - for Double CInt(txtBox) - for Integer Example: Dim Age As Integer/Double Age = CInt/CDbl(txtAge.Text)
Concatenation and Append
operators join multiple strings into a single string
operators are + and &
Empty String
string with no contents “”
Comments
brief explanatory notes preceded by ‘ added to code for the benefit of those reading it
Scope of a Variable
the set of all code that can refer to it without qualifying its name or making it available through an Imports Statement (.NET Namespace and Type); specified when a variable is declared; portion of a program that sees a variable
Named Constant
“variable” whose value does not change; makes programs easier to understand and update; use Upper case letters
Example:
ConstTAX_Rate As Double = 0.05
ConstMINIMUM_WAGE As Double = 7.25
String and Format Functions
functions that search and/or manipulate strings
Error: Syntax
misspellings, omissions, incorrect punctuation, etc.
Error: Runtime
overflow, etc.
Example:
Dim numVar As Integer = 1000000
numVar = numVar * numVar
Error: Logic
Example: Dim Average As Double Dim m As Double = 5 Dim n As Double = 10 average = m + n / 2 <--Forgot the parentheses around the formula