summary09 - • When testing test boundary values such as 0...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//EXAMPLE void give_output( double cost, int turnover, double price); //Precondition: cost is the wholesale cost of one item; //turnover is the expected time until sale of the item; //price is the retail price of the item. //Postcondition: The values of cost, turnover, and price have //been written to the screen. Summary Ch 4.3 – 4.4s Chapter 4.3 Procedural Abstraction Can call a function from another function Cannot define a function from another function Preconditions state what is assumed true when the function is called Postconditions describe the effect of the function call
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • When testing, test boundary values such as 0, 1, -1 or other important numbers. Chapter 4.4 Testing and Debugging Functions • Driver programs are programs that only test functions • Breaks function into little problems instead of big problems. • Test function used inside another by simplifying the function into a stub. • Every function should by tested in a program in which every other function in that program has already been fully tested and debugged...
View Full Document

This note was uploaded on 08/26/2009 for the course CS 140 taught by Professor Staff during the Fall '08 term at Southern Illinois University Edwardsville.

Ask a homework question - tutors are online