2.3 Know and respect existing laws pertaining to professional work: The US Can-Spam Act of
2004 prohibits the practice of spamming. The name of the act stands for Controlling the Assault
of Non-Solicited Pornography and Marketing.
2.8 Access computing and communication resources only when authorized: Clearly, spammers are
not authorized by the receivers to send their unsolicited messages.
By violating all these principles, spamming is clearly not acceptable to the ACM Code of Ethics.
214 ANSWERS TO REVIEW QUESTIONS
9.4 Inspection of a computer program controlling a weapons system shows 54 ???if??? statements (23 with
???else??? clauses), 4 ???switch??? statements (with 5, 7, 4, and 8 ???cases???), and 17 ???for??? or ???while??? loops
with parameterized looping boundaries. How would you exhaustively test such a program to prove
its safety?
To exhaustively test all possibilities, you would have to test all paths through the program:
31 * 2 (if statements) * 23 * 3 (if else) * 5 * 7 * 4 * 8 (switches) * 17 (loops) * 4 (loop test cases
per loop) ~ 325 million test runs
9.5 Assume you have just created a program to schedule taxicabs in real time. You??™re sure that your
approach is entirely new and much better than anything else available.
Pages:
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541