Source of stub_driver.cpp


  1: //stub_driver.cpp
  2: //A new kind of generic shell program containing "stubs" and
  3: //a main "driver" which can be used as a starting point for
  4: //many programs containing several functions.

  6: #include <iostream>
  7: using namespace std;


 10: void DescribeProgram();
 11: void GetInputData();
 12: void ComputeSomeValues();
 13: void DisplayAllValues();


 16: int main()
 17: {
 18:     DescribeProgram();
 19:     GetInputData();
 20:     ComputeSomeValues();
 21:     DisplayAllValues();
 22:     cout << endl;
 23: }


 26: void DescribeProgram()
 27: //Pre/Post conditions
 28: {
 29:     cout << "\nThis program is wonderful ...\n";
 30: }


 33: void GetInputData()
 34: //Pre/Post conditions
 35: {
 36:     cout << "\nNow inside GetInputData ...\n";
 37: }


 40: void ComputeSomeValues()
 41: //Pre/Post conditions
 42: {
 43:     cout << "\nNow inside ComputeSomeValues ...\n";
 44: }


 47: void DisplayAllValues()
 48: //Pre/Post conditions
 49: {
 50:     cout << "\nNow inside DisplayAllValues ...\n";
 51: }