You are on page 1of 3

Jairus Takay

11/03/15
1st Period
Computer Programming 1
Test

1). Syntax error? A character or string incorrectly placed in a command or instruction that
causes a failure in execution. Other names for syntax error are: Run time error and Logic error.
2). How do know you have a syntax error when looking at your code? When the code is in red,
and it do not work when trying to run the application.
3). Logic error? Logic error is a bug in a program that causes it to operate incorrectly, but not to
terminate abnormally (or crash).
4). Possible reasons for logic errors is when you use the wrong function.
5). Desk checking? Desk checking is an informal manual test that programmers can use to
verify coding and algorithm logic before a program launch.
6). Four things that should be checked when desk checking? - Checking algorithm.
- Unused variables. Input and Output. Logic Errors.
7). Run time errors? A runtime error is a software or hardware problem that prevents a program
from working correctly. Runtime errors might cause you to lose information in the file you're
working on, cause errors in the file (corrupt the file) so you can't work with it, or prevent you from
using a feature.
How are run time errors caused? Running two software that are not compatible, computer
memory issue, computer have a virus.
8). what happens when a run time error is detected? When the program crashes.
9). what is programmer debugging? Is when you manually debug yourself.
10). Program debugging? When the machines debugs automatically.
11). what is a break point? When you stop, and break from coding.
12). what are two ways to add a break point? double clicking beside the line of code.
- clicking on the stop program, and referencing the console.
13). what happens to your code when you add a breakpoint? The line of source code is colored
yellow.
14). what happens when a breakpoint is reached when running a program? Execution stops
when the breakpoint is hit, before the code on that line is executed.
15). Define the following tools

-run, pause, stop, run into, run over, run out.


16). what is watch window? The windows that allowed you to edit and change variable.
17). what is break mode? Stop the operation of an application and give you snap shot of the
conditions.
18). When is the watch window displayed? Click the button that say watch window.
19). How do add a variable to a watch window? Start debugging. Execution stops at the
breakpoint. Open the Quick Watch window (right-click on a, then choose Debug / Quick Watch,
or SHIFT+F9).You can open the window and add the variable to the Expression window, then
click Reevaluate. You should see the variable in the Values window, with a value of 2.
20). what is the local watch window? Window use to edit the value of a variable or register.
21). Try and Catch? Try" and "catch" are keywords that represent the handling of exceptions
due to data or coding errors during program execution. A try block is the block of code in which
exceptions occur. A catch block catches and handles try block exceptions
22). Basic format of trycatch:
Try
[ tryStatements ]
[ Exit Try ]
[ Catch [ exception [ As type ] ] [ When expression ]
[ catchStatements ]
[ Exit Try ] ]
[ Catch ... ]
[ Finally
[ finallyStatements ] ]
End Try
23). Statement to show a message box: MessageBox.Show(incorrect input. Enter a number
please)
24). what is IsNumeric?
If IsNumeric(strNumEnt) Then
intNum = Convert. ToInt32(strNumEnt)
Else
MessageBox.Show(incorrect input. Enter a number please)

You might also like