// silent.cpp
// Glenn G. Chappell
// 9 Sep 2009
//
// For CS 311 Fall 2009
// Demo of silently written & called functions

// *********************************************
// * NOTE: THIS IS A DELIBERATELY BAD EXAMPLE. *
// * DO NOT IMITATE IT!                        *
// *********************************************

#include <iostream>
using std::cout;
using std::endl;
using std::cin;


// class Cat
// Default ctor & dctor print messages
// Invariants: None.
class Cat {

// ***** Cat: ctor, dctor *****
public:
    // Default ctor
    // Prints a message
    // Pre: None.
    // Post: Message printed to cout.
    Cat()
    {
        cout << "Meow." << endl;
    }

    // Dctor
    // Prints a message
    // Pre: None.
    // Post: Message printed to cout.
    ~Cat()
    {
        cout << "Hiss!!!!" << endl;
    }
};  // End class Cat


// class Dog
// What member functions does this have?
// Invariants: None.
class Dog {

// ***** Dog: Data members *****
private:
    int a;
    double b;
    Cat c;
};  // End class Dog


// Global variables
Dog array[7];


// main
// Do-almost-nothing program - prints a message.
int main()
{
    cout << "Silence is golden." << endl;

    return 0;
}
