Derived Class Example

class CheapAccount : public Account{ 
// Specification fields: 
//   minutes = number of minutes called since the last bill() 
//   freemin = number of free minutes per billing period 
//   rate = charge of nonfree calls per-minute 

public: 
    explicit CheapAccount (const AccountNo& num); 
      // ensures: initializes this to a CheapAccount whose 
      //             Actno == num 
      //             balance == 0 
      //             minutes == 0 
      //             fee == 30
      //             freemin == 200 
      //             rate == 1 

    virtual void bill(): 
      //  requires: ?? 
      //  modifies: ?? 
      //  ensures:  ??

results matching ""

    No results matching ""