24
Last PowerPoint for NOCTI May 9, 2013

Last PowerPoint for NOCTI

  • Upload
    alder

  • View
    39

  • Download
    1

Embed Size (px)

DESCRIPTION

Last PowerPoint for NOCTI. May 9, 2013. NOCTI Testing. Monday, May 13 th Tuesday, May 14 th Wednesday, May 15 th. Truncation Error. Truncation error is the difference between a truncated value and the actual value. - PowerPoint PPT Presentation

Citation preview

Page 1: Last PowerPoint for NOCTI

Last PowerPoint for NOCTIMay 9, 2013

Page 2: Last PowerPoint for NOCTI

NOCTI Testing

• Monday, May 13th

• Tuesday, May 14th

• Wednesday, May 15th

Page 3: Last PowerPoint for NOCTI

Truncation Error• Truncation error is the difference between a truncated value

and the actual value. • A truncated quantity is represented by a numeral with a fixed

number of allowed digits, with any excess digits "chopped off" (hence the expression "truncated").

• Example:– In computing applications, truncation error is the

discrepancy that arises from executing a finite number of steps to approximate an infinite process. For example, the infinite series 1/2 + 1/4 + 1/8 + 1/16 + 1/32 ... adds up to exactly 1. However, if we truncate the series to only the first four terms, we get 1/2 + 1/4 + 1/8 + 1/16 = 15/16, producing a truncation error of 1 - 15/16, or 1/16.

http://whatis.techtarget.com/definition/truncation-error

Page 4: Last PowerPoint for NOCTI

Run Time Error• Error occurs while your programming is working

(running).• Example:

– Error like division-by-zero occur as a program runs.• Solution:

– Error handling refers to the anticipation, detection, and resolution of programming, application, and communications errors. Specialized programs, called error handlers, are available for some applications. The best programs of this type forestall errors if possible, recover from them when they occur without terminating the application, or (if all else fails) gracefully terminate an affected application and save the error information to a log file.

Page 5: Last PowerPoint for NOCTI

Arithmetic Error

• Many programs use numerical variables and the algorithm may involve several mathematical calculations.

• Arithmetic errors crop up when the computer cannot handle problems like 'Division By Zero' leading to an infinite result. This is again a logical error which can only be corrected by changing the algorithm.

Page 6: Last PowerPoint for NOCTI

Syntax• Refers to the spelling and grammar of

a programming language. • Computers are inflexible machines

that understand what you type only if you type it in the exact form that the computer expects.

• The expected form is called the syntax.

Page 7: Last PowerPoint for NOCTI

Debug

• To find and remove errors (bugs) from a software program.

• Bugs occur in programs when a line of code or an instruction conflicts with other elements of the code.

Page 8: Last PowerPoint for NOCTI

Pseudocode• An outline of a program, written in a form that can easily be

converted into real programming statements. • For example, the pseudocode for a bubble sort routine might

be written: while not at end of listcompare adjacent elementsif second is greater than firstswitch them get next two elementsif elements were switchedrepeat for entire list

• Pseudocode cannot be compiled nor executed, and there are no real formatting or syntax rules.

• The benefit of pseudocode is that it enables the programmer to concentrate on the algorithms without worrying about all the syntactic details of a particular programming language. In fact, you can write pseudocode without even knowing what programming language you will use for the final implementation.

Page 9: Last PowerPoint for NOCTI

Order of calculation?• In C, C++, Java the order is: () [] -> . ! ~ ++ -- + - * & / % << >> < <= > <= == != ^ | && || ?: = += -= *= /= %= &= ^= |= <<= >>=• In Pascal the order is:

* / + - = < > <> <= >= :=• In Perl the order is:-> ++ -- ** ! ~ \ + - . =~ !~ * / % < > <= >= == != <=> ~~ & | ^ && || 'http://en.wikipedia.org/wiki/Operator_(programming)

Page 10: Last PowerPoint for NOCTI

Study Questions

• A data element is intended to contain a range from 15 to 30 and after testing it contains 32. What kind of error is this?

a) Truncationb) Roundingc) Run timed) Boundary

Page 11: Last PowerPoint for NOCTI

• An output field has “Los Angeles” moved to it and when examined contains “Los Angel”. This indicates a/an _______________ error.

a) Logicalb) Arithmeticc) Truncationd) Semantic

Page 12: Last PowerPoint for NOCTI

• Which of the following errors is caused by a calculation error?

a) Logicalb) Arithmeticc) Truncationd) Semantic

Page 13: Last PowerPoint for NOCTI

• Which of the following consists of a sequence of events to follow so they can be repeated?

a) Runtimeb) Test filesc) Trace routed) Script

Page 14: Last PowerPoint for NOCTI

• Compile errors can be caused by which of the following?

a) Bad syntaxb) Input datac) Insufficient test datad) Incorrect user specification

Page 15: Last PowerPoint for NOCTI

• Maintenance refers to changes to a system in operating arising from error corrections, performance improvements, changes in the business environment and

a) Enhancements in functionsb) Application requirementsc) Referencing softwared) Material requirements

Page 16: Last PowerPoint for NOCTI

• The _________________ document lays out the general requirements that when changed, motivate the existence and purpose of a give code set.

a) Technical reportb) Designc) User interfaced) Marketing

Page 17: Last PowerPoint for NOCTI

• One method of ensuring that updates to documentation are efficiently distributed is to

a) Send customers printed documentation annually regardless of whether there have been changes.

b) Make changes in an online help system rather than printed sources

c) Send fliers containing only the changes rather than new printed volumes

d) Make changes only on a pre-specified schedule

Page 18: Last PowerPoint for NOCTI

• All computer instructions are based on four basic logic patterns. These patterns are simple sequence, selection, loop, and __________________.

a) Trailerb) Modularc) Top-downd) Branch

Page 19: Last PowerPoint for NOCTI

• Which of the following uses three basic control structures to form highly structured units of code?

a) Structured programmingb) Circular connectorc) Modular constructiond) Loop structure

Page 20: Last PowerPoint for NOCTI

• If the memory speed of the bus is 750MHz, and the CPU is operating at twice the speed of the bus, what is the processor speed?

a) 375MHzb) 750MHzc) 1.5GHzd) 2 GHz

Page 21: Last PowerPoint for NOCTI

• Two types of programs that create machine codes are the interpreter and the

a) Assemblerb) Objectc) Compilerd) Source

Page 22: Last PowerPoint for NOCTI

In the order of calculations in a programa) Addition precedes exponentiationb) Parentheses precede exponentiationc) Subtraction precedes additiond) Multiplication precedes

exponentiation

Page 23: Last PowerPoint for NOCTI

• When the code below is executed, strAdd will be equal to

strFirst=”123”strSecond=”456”strAdd = strFirst + strSecond

 a) “579”b) “123+456”c) “123456”d) “strFirst + strSecond”

Page 24: Last PowerPoint for NOCTI

For Today:

• Finish answering your 17 questions worksheet in your packet.

• Field Trip is Monday, May 20th!• Don’t forget to bring in your permission

slips!