留学生代考 Possible Problems in InsertImage.java program

Possible Problems in InsertImage.java program

· line 25 should write to param 3 not 2
· line 24: possible index out of bounds

Copyright By PowCoder代写 加微信 powcoder

· line 17: connection might fail.
· Poor exception reporting => should print message (and not stack trace?)
· Line 25: Arbitrary! non-image files are put into database
· Line 27: System.out not flushed
· Line 19: database may not have Image table
· Line 29-31: some close statements may be skipped. Use finally.

Possible Solutions to Cost-Benefit Analysis (for Testing)

· Do nothing: => 1200 bugs. Let the users find them!
· All system testing: 50 hours of manual testing finds 500 bugs. Leaves 700.
· All unit testing: => 5 modules * $1000 => find 300 bugs. Leaves 900.
· Note to self: In future: do unit testing DURING development!
· Mix: $3000 on unit testing (finds 180 bugs), $2000 system testing (finds 200 bugs). This leaves 1200-380 – 820 bugs. Not optimal, but has the advantage that we find the most common system bugs, and also develop some unit tests that can be re-used in future releases…

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com