bilal Hameed Flashcards
What does “IDE” stand for?
Integrated development environment
Reasons why you would use an IDE
easy to use. Tools at your disposal. Easy to navigate. Automatic code generation.
What are the three main components of any program?
Explain briefly?
Input, Process, Output
-Processing involves the manipulation of data into information
What are some examples of sources of input for a program?
Mouse, keyboard, Mic
What are some examples of sources of output for a program?
Speakers, Monitor, Printer
Define what an algorithm is
a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
What are the six steps in the Program Development Cycle, and explain each one:
Analyze, Design, Choose the Interface, Code, Test and Debug, Documentation
Name three programming tools that help convert algorithms into code, and explain each one:
Flowcharts, Pseudocode, and Hierarchy Charts
What is the “Divide-and-conquer” method?
A divide-and-conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly.
Name and explain the three statement structures that are available in programming
Sequence, Decision, Looping
Explain what a GUI is
Graphical User interface. Allows users to interact with an interface using visual icons. i.e Button
Define an “event-driven” language
language where the outcome is determined by an event like user input or sensor output.
Name four different controls that are available to us when designing a form
Textbox, Listbox, Label, Button
Name a control that can be used for both input and output
Textbox
Describe how the AutoSize property works for a label: what does it do?
It adjusts the size of the label to the size of the text within it.
Name the two primary purposes for a list box control.
display text. have it appear in a list.
What is the difference between a proportional-width font and a fixed-width font?
proportional has no spaces between characters while fixed width does.
Describe the tab order on a form, and why it is important.
it allows the user to easily switch between the tabs to access multiple forms and from code.
What is an event?
An event is a signal that informs an application that something important has occurred
Name and describe the steps in creating a Visual Basic program:
Create the interface
o Set properties
o Write the code
Name two ways to get access to the event procedures for an object:
Double-click on a control
o Use the Class Name and Method Name boxes
Can an event procedure be invoked by more than one event?
yes
Describe how a txt file can be used for both input and output.
one can use a text box to input a number an use another textbox to output that same number
Describe the purpose of the following built-in functions: Math.Sqrt, Int, Math.Round
treats the values they are applied to as mathematical value. Int, for example, turns the value into an integer.
Define a numeric variable
Variables with a number or value. sum = 10
What value are numeric variables automatically initialized to?
zero
Show two different ways that var can be incremented by 1
var = var + 1, var += 1
What is a Function?
a section of a program that performs a specific task. Procedure or routine.
Why can Double variables be assigned both whole numbers and numbers with decimals?
double isn’t specific to whole numbers
Can you assign a decimal number to an Integer? Why or why not?
no. Integers only hold whole numbers.
Name and describe three different types of errors that can be encountered in Visual Basic:
Syntax, Run-time, Logic
grammar, programs runs but not properly, does not do what the program expects
Describe what Trim, ToLower, IndexOf, Substring, and ToUpper do.
trims the excess space, converts to uppercase or lowercase, will return a substring of a given string.
What is a string literal?
A string literal is a sequence of characters surrounded by quotation marks
The contents of a textbox is always a ___________?
input/output
How would you convert the contents of a textbox into a Double?
Cdbl
How would you display the contents of n in a textbox if n was an Integer? If n was a string?
textbox.text = Cint(n), textbox.text = Cstr(n)
How do you combine two strings?
&
Remember that position of characters in a string is zero-based.
yes character positions start at zero
Remember syntax of SubString: str.Substring(m, n)
str.Substring(m, n)
What are two reasons for using a zero-length string?
vb starts at zero. binary 0 and 1 ???
What is the default initial value of a String?
nothing
What is the Line-Continuation Character, and why would you use it?
it breaks from a line and continues it on a second line.
used in listbox to create a list.
Define what the scope of a variable is, and provide examples.
Scope refers to the visibility of variables. In other words, which parts of your program can see or use it. Normally, every variable has a global scope. Once defined, every part of your program can access a variable.
What is the difference between a Mask textbox and a regular text box?
masked text box has aset parameters that the input can be. textbox can be anything.
What is the ANSI Character set?
A numeric representation for every key on the keyboard and for other assorted characters
What is the difference between Chr(n) and Asc(str), and give an example of both?
Chr(n) converts ansi number to letter and Asc(str) converts ansi letters to numbers
Name and describe the six different relational operators that are possible in Visual Basic.
< less than <= less than or equal to > greater than >= greater than or equal to = equal to <> not equal to
What is a condition?
a statement or line of code that must be true to be executed. involving rational or logical operators.
What possible values does a condition evaluate to?
if statements are conditional statemets. all kinds of values such as seeing whihc value was inputed by the user.
What does it mean when we say that a relational operator is binary?
they require an operand on both sides of the operator.
In what order are expressions evaluate? Can we alter this order?
left to right. yes, using brackets.
Name and describe the three different logical operators that are possible in Visual Basic.
- not makes a False expression True and vice versa
- and will yield a True if and only if both expressions are True.
- or will yield a True if at least one of both expressions are True.
What is the opposite of “Not(2 < 3)”?
(2>3)
What logic takes place with an IF block
And
How is an IF block different than an ELSEIF structure?
if block all condition must be true while Elseif block only one has to be true.
What is a nested IF block?
an if block with multiple if statements with in it.
A selection from many possibilities can be accomplished through IF blocks, ELSEIF structures, or
______________?
select cases
Think about appropriate syntax and possibilities for Case statements in Select Case.
cant name a case a vb basic command such as double or integer
Define block-level scope.
part of the code that only visible within that certain block.
What are the similarities/differences between Sub procedures and Functions?
Call statements, uses, etc.
What is the lifetime of a variable? What is the scope of a variable? Are the two items the same:
lifetime of variable is the ammount of time that variable is a certain value until it is changes while the scope of a variable is a the area of code in which the variable is applied.
Define the “Top-down” design methodology.
breaking down a code into its small pieces to see how it was constructed.
- What are the advantages of structure programming (explain each point)? What constructs do
we use for structured programming?
Easy to Write, Easy to Understand, Easy to change
Decisions, Sequences, Looping
Define object-oriented programming
model organized around objects rather than action.