Software Testing A Craftsman S Approach 4th Jorgensen Solution Manual
Software Testing A Craftsman S Approach 4th Jorgensen Solution Manual
Chapter 2
Examples
• Language neutral
• Supports both procedural and
object-oriented code
• Easy to “translate” into your
favorite programming language
• Triangle problem
• NextDate
• Commission problem
• Simple ATM system
• Currency converter
• Windshield Wiper controller
• Garage door controller
Problems persist! What output is expected for the input set (2, 2, 5)?
• Isosceles because a = b?
• NotATriangle because c > a+b?
A rifle salesperson in the former Arizona Territory sold rifle locks, stocks, and
barrels made by a gunsmith in Missouri. Locks cost $45, stocks cost $30,
and barrels cost $25. The salesperson had to sell at least one complete rifle
per month, and production limits were such that the most the salesperson
could sell in a month was 70 locks, 80 stocks, and 90 barrels. After each
town visit, the salesperson sent a telegram to the Missouri gunsmith with the
number of locks, stocks, and barrels sold in that town. At the end of a month,
the salesperson sent a very short telegram showing –1 locks sold. The
gunsmith then knew the sales for the month were complete and computed
the salesperson’s commission as follows: 10% on sales up to (and
including) $1000, 15% on the next $800, and 20% on any sales in excess of
$1800. The commission program produced a monthly sales report that gave
the total number of locks, stocks, and barrels sold, the salesperson’s total
dollar sales, and, finally, the commission.
Currency Converter
U.S. Dollar amount
Equivalent in ...
Brazil
Compute
Canada
Clear
European community
Quit
Japan
a1. Wiper 0 4 6 12 30 60
speed is…