bilal Hameed Flashcards

1
Q

What does “IDE” stand for?

A

Integrated development environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Reasons why you would use an IDE

A

easy to use. Tools at your disposal. Easy to navigate. Automatic code generation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three main components of any program?

Explain briefly?

A

Input, Process, Output

-Processing involves the manipulation of data into information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some examples of sources of input for a program?

A

Mouse, keyboard, Mic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some examples of sources of output for a program?

A

Speakers, Monitor, Printer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define what an algorithm is

A

a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the six steps in the Program Development Cycle, and explain each one:

A

Analyze, Design, Choose the Interface, Code, Test and Debug, Documentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name three programming tools that help convert algorithms into code, and explain each one:

A

Flowcharts, Pseudocode, and Hierarchy Charts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the “Divide-and-conquer” method?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Name and explain the three statement structures that are available in programming

A

Sequence, Decision, Looping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain what a GUI is

A

Graphical User interface. Allows users to interact with an interface using visual icons. i.e Button

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define an “event-driven” language

A

language where the outcome is determined by an event like user input or sensor output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name four different controls that are available to us when designing a form

A

Textbox, Listbox, Label, Button

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name a control that can be used for both input and output

A

Textbox

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe how the AutoSize property works for a label: what does it do?

A

It adjusts the size of the label to the size of the text within it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Name the two primary purposes for a list box control.

A

display text. have it appear in a list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the difference between a proportional-width font and a fixed-width font?

A

proportional has no spaces between characters while fixed width does.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Describe the tab order on a form, and why it is important.

A

it allows the user to easily switch between the tabs to access multiple forms and from code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is an event?

A

An event is a signal that informs an application that something important has occurred

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Name and describe the steps in creating a Visual Basic program:

A

Create the interface
o Set properties
o Write the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Name two ways to get access to the event procedures for an object:

A

Double-click on a control

o Use the Class Name and Method Name boxes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Can an event procedure be invoked by more than one event?

A

yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Describe how a txt file can be used for both input and output.

A

one can use a text box to input a number an use another textbox to output that same number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Describe the purpose of the following built-in functions: Math.Sqrt, Int, Math.Round

A

treats the values they are applied to as mathematical value. Int, for example, turns the value into an integer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Define a numeric variable

A

Variables with a number or value. sum = 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What value are numeric variables automatically initialized to?

A

zero

27
Q

Show two different ways that var can be incremented by 1

A

var = var + 1, var += 1

28
Q

What is a Function?

A

a section of a program that performs a specific task. Procedure or routine.

29
Q

Why can Double variables be assigned both whole numbers and numbers with decimals?

A

double isn’t specific to whole numbers

30
Q

Can you assign a decimal number to an Integer? Why or why not?

A

no. Integers only hold whole numbers.

31
Q

Name and describe three different types of errors that can be encountered in Visual Basic:

A

Syntax, Run-time, Logic

grammar, programs runs but not properly, does not do what the program expects

32
Q

Describe what Trim, ToLower, IndexOf, Substring, and ToUpper do.

A

trims the excess space, converts to uppercase or lowercase, will return a substring of a given string.

33
Q

What is a string literal?

A

A string literal is a sequence of characters surrounded by quotation marks

34
Q

The contents of a textbox is always a ___________?

A

input/output

35
Q

How would you convert the contents of a textbox into a Double?

A

Cdbl

36
Q

How would you display the contents of n in a textbox if n was an Integer? If n was a string?

A

textbox.text = Cint(n), textbox.text = Cstr(n)

37
Q

How do you combine two strings?

A

&

38
Q

Remember that position of characters in a string is zero-based.

A

yes character positions start at zero

39
Q

Remember syntax of SubString: str.Substring(m, n)

A

str.Substring(m, n)

40
Q

What are two reasons for using a zero-length string?

A

vb starts at zero. binary 0 and 1 ???

41
Q

What is the default initial value of a String?

A

nothing

42
Q

What is the Line-Continuation Character, and why would you use it?

A

it breaks from a line and continues it on a second line.

used in listbox to create a list.

43
Q

Define what the scope of a variable is, and provide examples.

A

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.

44
Q

What is the difference between a Mask textbox and a regular text box?

A

masked text box has aset parameters that the input can be. textbox can be anything.

45
Q

What is the ANSI Character set?

A

A numeric representation for every key on the keyboard and for other assorted characters

46
Q

What is the difference between Chr(n) and Asc(str), and give an example of both?

A

Chr(n) converts ansi number to letter and Asc(str) converts ansi letters to numbers

47
Q

Name and describe the six different relational operators that are possible in Visual Basic.

A
<		less than
<=		less than or equal to
>		greater than
>=		greater than or equal to
=		equal to
<>		not equal to
48
Q

What is a condition?

A

a statement or line of code that must be true to be executed. involving rational or logical operators.

49
Q

What possible values does a condition evaluate to?

A

if statements are conditional statemets. all kinds of values such as seeing whihc value was inputed by the user.

50
Q

What does it mean when we say that a relational operator is binary?

A

they require an operand on both sides of the operator.

51
Q

In what order are expressions evaluate? Can we alter this order?

A

left to right. yes, using brackets.

52
Q

Name and describe the three different logical operators that are possible in Visual Basic.

A
  • 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.
53
Q

What is the opposite of “Not(2 < 3)”?

A

(2>3)

54
Q

What logic takes place with an IF block

A

And

55
Q

How is an IF block different than an ELSEIF structure?

A

if block all condition must be true while Elseif block only one has to be true.

56
Q

What is a nested IF block?

A

an if block with multiple if statements with in it.

57
Q

A selection from many possibilities can be accomplished through IF blocks, ELSEIF structures, or
______________?

A

select cases

58
Q

Think about appropriate syntax and possibilities for Case statements in Select Case.

A

cant name a case a vb basic command such as double or integer

59
Q

Define block-level scope.

A

part of the code that only visible within that certain block.

60
Q

What are the similarities/differences between Sub procedures and Functions?

A

Call statements, uses, etc.

61
Q

What is the lifetime of a variable? What is the scope of a variable? Are the two items the same:

A

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.

62
Q

Define the “Top-down” design methodology.

A

breaking down a code into its small pieces to see how it was constructed.

63
Q
  • What are the advantages of structure programming (explain each point)? What constructs do
    we use for structured programming?
A

Easy to Write, Easy to Understand, Easy to change

Decisions, Sequences, Looping

64
Q

Define object-oriented programming

A

model organized around objects rather than action.