|
|
|
|
|
|
|
//******************************************************************
void PrintJanuary()
{
cout << "January printed' < endl;
}
//******************************************************************
void PrintFebruary()
{
cout << "February printed" < endl;
}
//******************************************************************
void PrintMarch()
{
cout << "March printed" < endl;
}
.
.
.
//******************************************************************
void PrintDecember()
{
cout <<"December printed' < endl;
} |
|
|
|
|
|
|
|
|
Testing: To test this program, we must run it 12 times. For each run, a different month is used as input, the appropriate print function is called, and the corresponding message is printed. If you want to use this program, you have to create the output statements to print the data for your friends. The stubs we use to test the rest of the program merely show that each print function is called correctly. We have more to say about testing this program in the Testing and Debugging section that follows. |
|
|
|
|
|
|
|
|
When a problem requires the use of floating point numbers that are extremely large, small, or precise, it is important to keep in mind the limitations of |
|
|
|
|
|