240 likes | 353 Views
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.
E N D
Last PowerPoint for NOCTI May 9, 2013
NOCTI Testing • Monday, May 13th • Tuesday, May 14th • Wednesday, May 15th
Truncation Error • Truncation error is the difference between a truncatedvalue 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
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.
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.
Syntax • Refers to the spelling and grammar of a programming language. • Computersare 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.
Debug • To find and remove errors (bugs) from a softwareprogram. • Bugs occur in programs when a line of code or an instruction conflicts with other elements of the code.
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.
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)
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? • Truncation • Rounding • Run time • Boundary
An output field has “Los Angeles” moved to it and when examined contains “Los Angel”. This indicates a/an _______________ error. • Logical • Arithmetic • Truncation • Semantic
Which of the following errors is caused by a calculation error? • Logical • Arithmetic • Truncation • Semantic
Which of the following consists of a sequence of events to follow so they can be repeated? • Runtime • Test files • Trace route • Script
Compile errors can be caused by which of the following? • Bad syntax • Input data • Insufficient test data • Incorrect user specification
Maintenance refers to changes to a system in operating arising from error corrections, performance improvements, changes in the business environment and • Enhancements in functions • Application requirements • Referencing software • Material requirements
The _________________ document lays out the general requirements that when changed, motivate the existence and purpose of a give code set. • Technical report • Design • User interface • Marketing
One method of ensuring that updates to documentation are efficiently distributed is to • Send customers printed documentation annually regardless of whether there have been changes. • Make changes in an online help system rather than printed sources • Send fliers containing only the changes rather than new printed volumes • Make changes only on a pre-specified schedule
All computer instructions are based on four basic logic patterns. These patterns are simple sequence, selection, loop, and __________________. • Trailer • Modular • Top-down • Branch
Which of the following uses three basic control structures to form highly structured units of code? • Structured programming • Circular connector • Modular construction • Loop structure
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? • 375MHz • 750MHz • 1.5GHz • 2 GHz
Two types of programs that create machine codes are the interpreter and the • Assembler • Object • Compiler • Source
In the order of calculations in a program • Addition precedes exponentiation • Parentheses precede exponentiation • Subtraction precedes addition • Multiplication precedes exponentiation
When the code below is executed, strAddwill be equal to strFirst=”123” strSecond=”456” strAdd= strFirst + strSecond • “579” • “123+456” • “123456” • “strFirst + strSecond”
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!